Closed lcetinsoy closed 4 years ago
Hi thanks for reaching out! This lib hasn't had any updates lately, but should get some love 😉
As for the demo repository that is a great idea. I'll take you example and will se to set it up.
For the symfony part: I am not very familiar with symfony, but will try to see why you needed to change the app path.
Also I would appreciate a PR with a doc update on how to use it with symfony 👍
Hello !
I am trying to use this framework which I always found very interesting but a bit difficult to setup. It is not the first time I fail to set it up with Symfony. I was not able to make a simple contract fails. Then I tried to use the demo to see if it was working on my setup and it is a bit tedious to setup (but I succeed ! ).
I think that this project is very nice and that Design By Contract should have better recognition. I think that with a slightly better documentation your tool could be much easier to use and has more user. Its pities me that its potential remains untapped.
So my issue has two points :
I am willing to do a PR with docs and example when I solve my use case (even doing a blog post if time someday).
I tried to the following code in my app_dev.php file with an obvious contract fail and everything goes normally, even if I do put it in my app_dev.php. Any Hint ?
Contract in some subfolder of "src" folder :
in my app_dev.php :
Regarding the demo it could be nice to move the files in demo into a sub folder "src" and ad a composer json in the demo folder with the following values. So you just clone cd demo && composer install && php demo.php and works in one line :)
Thanks in advance !
[edit] : showing the list of parsed classes and available contracts could be nice, looking in code now. [edit2] : think symfony is ok, needed to change app path to DIR '/../' even though I had an explicit includePaths, can you explain why ?