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

PHP Fatal error: Class 'Zend\Stdlib\ArrayObject' not found in vendor/zendframework/zend-code/src/Generator/ValueGenerator.php on line 89 #260

Closed
narozhniyy opened this issue Nov 12, 2015 · 17 comments
Assignees
Labels

Comments

@narozhniyy
Copy link

Hi all. Have issue with Ocramius/ProxyManager, get package from composer and in zendframework/zend-code/src/Generator/ValueGenerator.php used Zend\Stdlib\ArrayObject; But this class not available, and I have PHP Error.
Maybe need change use Zend\Stdlib\ArrayObjec on use ArrayObject and all going work.

@malukenho malukenho added the bug label Nov 12, 2015
@malukenho malukenho self-assigned this Nov 12, 2015
@malukenho
Copy link
Collaborator

Hello @narozhniyy,

Can you provide me the version of proxy manager that you're using? I tried to reproduce the problem using "ocramius/proxy-manager": "1.0.*" version, and all works fine.

Do you already try to reinstall the library?
composer remove ocramius/proxy-manager and then composer require ocramius/proxy-manager:1.0.*

@narozhniyy
Copy link
Author

HI @malukenho,
I used ocramius/proxy-manager:~0.5, but now update to "ocramius/proxy-manager": "1.0.*" and nothing is change.
@malukenho can you look into vendor/zendframework/zend-code/src/Generator/ValueGenerator.php, ArrayObject() - Undefined Class?

http://i.imgur.com/vDBiXLA.png
http://i.imgur.com/eKwJMF3.png

ArrayObject describe as Underfined Class

@malukenho
Copy link
Collaborator

It seems like something is wrong with your network or installation process. As I said, all is working fine, even on ~0.5 version.

Can you check if you have vendor/zendframework/zend-stdlib folder?

@narozhniyy
Copy link
Author

No, I doesn't have this folder only zend-code and zend-eventmanager

@malukenho
Copy link
Collaborator

Yeah. As I suspected, you're having trouble with installation. Try run composer update and see what happens.

@narozhniyy
Copy link
Author

I did it many times today, removed vendor folder and did it again

http://i.imgur.com/AMoiAs2.png

After update zend-stdlib folder doesn't exists

@malukenho
Copy link
Collaborator

@narozhniyy I finally understand what is happening. "minimum-stability": "dev" is breaking the operation of the library. Ouch!

@narozhniyy
Copy link
Author

@malukenho what i should to do? change "minimum-stability" value.

@malukenho
Copy link
Collaborator

@narozhniyy Probably yes, or you can add "zendframework/zend-stdlib": "*@STABLE" to your composer file as a temporary solution until we fix this.

@narozhniyy
Copy link
Author

@malukenho, yes that's help me, now all work and folders are exists. @malukenho thanks

@malukenho
Copy link
Collaborator

@narozhniyy you're welcome. I'll notify you when this is fixed.

@Ocramius
Copy link
Owner

This needs to be reported on zendframework/zend-code, @narozhniyy. Please open an issue there and link it here for reference :-)

@nicolas-grekas
Copy link
Contributor

here is the issue:

  • ocramius/proxy-manager requires zendframework/zend-code ^2.2.5
  • zendframework/zend-code requires zendframework/zend-eventmanager ^2.6|^3.0 and
  • zendframework/zend-code also requires zendframework/zend-stdlib but this is implicit, not explicit
  • zendframework/zend-eventmanager 2.x (branch develop) does "require" zendframework/zend-stdlib
  • zendframework/zend-eventmanager 3.0 (branch develop) does not "require" zendframework/zend-stdlib

Which means that either:

  • zendframework/zend-code needs to explicitly require zend-stdlib
  • or zendframework/zend-eventmanager 3.0 needs to explicitly require zend-stdlib
  • or ocramius/proxy-manager needs to explicitely require zend-stdlib
  • or ocramius/proxy-manager needs to "conflict" with zendframework/zend-eventmanager 3.0

I think the best is for zendframework/zend-code 2 to explicitly require zend-stdlib (or to stop accepting eventmanager 3, but this is not a strategic move for zf3 :) )

@nicolas-grekas
Copy link
Contributor

See symfony/symfony#16553 for a temporary workaround on Symfony

nicolas-grekas added a commit to symfony/symfony that referenced this issue Nov 18, 2015
…s-grekas)

This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #16553).

Discussion
----------

[ProxyManager] Tmp fix composer reqs issue in ZF

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

See Ocramius/ProxyManager#260 (comment)

Commits
-------

0125145 [ProxyManager] Tmp fix composer reqs issue in ZF
@Ocramius
Copy link
Owner

Also to be followed: zendframework/zend-code#23

@Maks3w
Copy link

Maks3w commented Nov 18, 2015

#23 has been released in zend-stdlib: 2.5.3 This can be closed.

@malukenho
Copy link
Collaborator

@Maks3w Thanks you so much!

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

No branches or pull requests

5 participants