Would it be possible to edit a laravel config file? #124
-
👋 Hi there, I'm really loving this library. Since I found it my mind has been alight with ideas for possible uses. Most recently, I attempted to use this project to edit a Laravel I thought about it some more and honestly didn't know what I was expecting to have happen. Laravel config files can generally be a variety of things including whole I would really love to be able to edit the config files without having to evaluate the Since the examples were class like files I wasn't sure if editing a simple php file with a returned array was a supported use case or not. 🤔 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I think PhpParser would be better suited for this. This library has an API for namespaces, classes, methods, functions, but not for PHP code itself, which it just sees as a strings. With PhpParser you can go further and parse the code of the arrays and modify it. |
Beta Was this translation helpful? Give feedback.
I think PhpParser would be better suited for this. This library has an API for namespaces, classes, methods, functions, but not for PHP code itself, which it just sees as a strings. With PhpParser you can go further and parse the code of the arrays and modify it.
https://github.com/nikic/PHP-Parser/