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

[4.0] dev/build fails when requireDefaultRecords uses a Zend class #6572

Closed
robbieaverill opened this issue Jan 27, 2017 · 7 comments
Closed

Comments

@robbieaverill
Copy link
Contributor

robbieaverill commented Jan 27, 2017

Version: dev-master#1c36ef9

To reproduce, add something like this to a Page class:

public function requireDefaultRecords()
{
    $list = \SilverStripe\Forms\CountryDropdownField::create('dummy')->getSource();
}

Then run a dev/build:

CREATING DATABASE RECORDS

 * SilverStripe\SiteConfig\SiteConfig
 * SilverStripe\CMS\Model\SiteTree
 * Page
PHP Fatal error:  Class 'Zend_Locale' not found in /path/to/ss40/framework/src/Forms/CountryDropdownField.php on line 58

Fatal error: Class 'Zend_Locale' not found in /path/to/ss40/framework/src/Forms/CountryDropdownField.php on line 58
ERROR [Alert]: Class 'Zend_Locale' not found
IN GET /dev/build
Line 58 in /path/to/ss40/framework/src/Forms/CountryDropdownField.php
@robbieaverill
Copy link
Contributor Author

Regression against 13bdec5 - @tractorcow thinks it might be caused by the removal of Zend_Translate in #6558

@tractorcow
Copy link
Contributor

We can patch a hack in for this in the short term; Zend will be removed shortly.

@dhensby
Copy link
Contributor

dhensby commented Jan 27, 2017

It sounds more like this issue is "CountryDropdown depends on removed Zend class"? Not really anything to do with dev/build... right?

@robbieaverill
Copy link
Contributor Author

robbieaverill commented Jan 27, 2017

For reference, there's half a dozen classes that use Zend_Locale, and there are probably more for other Zend classes

@dhensby
Copy link
Contributor

dhensby commented Jan 27, 2017

ah, ok

@dhensby dhensby added this to the CMS 4.0.0-alpha5 milestone Jan 27, 2017
@robbieaverill
Copy link
Contributor Author

I can't reproduce this any more - perhaps it was a case of being Friday.

If it resurfaces I think it should be feasible to add "psr-0": {"Zend_": "thirdparty/Zend/"} to the composer autoload section.

Closing...

@robbieaverill
Copy link
Contributor Author

Nope - it was a case of the Mondays - I had the Zend Locale package included with composer from earlier testing - this is still reproducible.

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

No branches or pull requests

3 participants