Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intergrate with PHPSpec and CodeIgnier #96

Closed
cyansilver opened this issue Aug 29, 2013 · 6 comments
Closed

Intergrate with PHPSpec and CodeIgnier #96

cyansilver opened this issue Aug 29, 2013 · 6 comments

Comments

@cyansilver
Copy link

Hi,

I used the framework with PHPSpec but PHPSpec raises an error relative to "stream_filter_register" function.
Additionally, I tried to use it with CodeIgniter but it doesn't work.

Can anyone please help me with those and explain how the framework works? Thank you.

@lisachenko
Copy link
Member

Hello, can you attach a trace with an error for PHPSpec? I will be able to try to reproduce this issue on weekend. If you could create a test repository with configured Codeigniter and Go! framework, I will be grateful you as this can reduce the time for investigating the root cause of this issue.

@cyansilver
Copy link
Author

Hi lisachenko,

I created the repository with configured CodeIgniter and Go! framework here: https://github.com/Cyansilver/ci_goaop
I'm not sure how to get a trace with the error for PHPSpec but the error is shown as below:
"exception [exc: RuntimeException ("Stream filter already registered") ]" has been throw.

@cyansilver
Copy link
Author

Sorry, I closed it accidentally, need reopen

@cyansilver cyansilver reopened this Sep 3, 2013
@lisachenko
Copy link
Member

Thank you very much for the pre-configured repo ) Unfortunately, I'm too busy now and can not investigate this issue. However, I have looked into the code in your repository and have an idea, that your configuration of AOP is not correct.
AOP should be configured only once at early stage of running the code (ideally, index.php or autoload.php). So, it will be better to extract the AOP configuration from the class and put it in the separate file.

For PHPSpec configuration of AOP is harder, but there is a possible way to add an extension for PHPSpec that will be registered automatically by PHPSpec kernel. To add an extension for AOP you can try to specify extension class in yml file for PHPSpec

@cyansilver
Copy link
Author

Hi lisachenko,

I knew the reason why I used CodeIgniter with Go! framework didn't work.
The reason is I didn't auto load the files using the composer. Now everything works fine.

@lisachenko
Copy link
Member

Great news ) Thank you for feedback! I know, that installation of AOP without composer is not clear enough, so sorry for this fact. I will continue development of my library in new year.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants