Thursday, March 30, 2017

Is there a script, tool or package to build and parse a PHP file? - Laravel 5.4

Within our application we're generating some PHP files.

At the moment we're using stubs to create them and comments to replace data in between when edited (like functions and properties). It's a bit bug sensitive in case a comment gets removed generating is broken.

We just can't find any good script, tool or package to build those files. Best case scenario would be some parsing tool that parses the file into an object where we can add properties, method and such and then build it back to a file.

Are there any scripts, tools or packages who does this and what are your recommendations?

EDIT

Our use case is an admin panel where we click our relations together including other properties that create table columns.

And we try to save those relations to the model by editing the file in code.



via Tim van Uum

Advertisement