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

Nette 2.3 BC break: Can't change Container class #64

Closed
enumag opened this issue Mar 3, 2015 · 2 comments
Closed

Nette 2.3 BC break: Can't change Container class #64

enumag opened this issue Mar 3, 2015 · 2 comments

Comments

@enumag
Copy link
Contributor

enumag commented Mar 3, 2015

In Nette 2.2 it was possible to change the DI container class manually using this parameter.

In Nette 2.3 this is not possible becasue the class name is generated here.

Using the parameter in 2.3 actually causes some unexpected behavior because this class_exists checks wrong class.

I changed my use-case accordingly so I don't need this.

@hrach
Copy link
Contributor

hrach commented Mar 3, 2015

Not true, actually, at the end of the file, there is generated extends.
class mysqlSystemContainer extends Container_f785477f4e {} https://github.com/nette/bootstrap/blob/5b7c055f38e8d329bc8f4b4504899b5b39be5199/src/Bootstrap/Configurator.php#L275

@enumag
Copy link
Contributor Author

enumag commented Mar 3, 2015

Ok. The real issue I experienced was that in tests I create the DIC multiple times (once for each test) which somehow leads to really wierd bug - this include failed because some class was already defined and since the error was suppresed by @ the script just ended there. The IOException was NOT thrown.

@enumag enumag closed this as completed Mar 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants