Quantcast
Channel: Porting a non-framework PHP project to Laravel 4.x - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Porting a non-framework PHP project to Laravel 4.x

$
0
0

I have a big PHP project in which I didn't use any framework (nor MVC pattern), and I want to gradually port it on Laravel with (almost) no downtime.
I'm searching for ways of making transparent the migration for pieces of code already ported to Laravel, while mantaining functional older plain PHP code.

For example, Laravel "overwrites" superglobals ($_GET, $_POST, etc.) using classes and methods, (ex. Input::get()). My plain PHP project of course makes direct use of superglobals. How can I overcome these "uncompatibilities" under Laravel without having to rewrite instantly all my PHP code?

Otherwise, if you think this task being too difficult, is there any PHP framework that, thanks to its internal structure, would make this task easier?

UPDATE:
The use of superglobals is still possible in laravel. I was getting a sneaky error: Laravel internally sets error_reporting to E_ALL and shows a custom error stack trace page even for PHP E_NOTICE, but without explicitly specifying the error level (that it is a NOTICE error), even if this was done by default by PHP error reporting message engine.

Let me say, for Laravel core developers, that I consider this "partially silent" behaviour as generally misleading for any PHP developer trying to port his code on to their framework.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>