53

You can use the following patch: 0001-BUGIFX-Magento-Zend-Framework-1-PHP5.6.patch It is from the full Github-Gist: Bugfix for Zend Framework 1 in Magento (>= 1.7..) + PHP 5.6 https://gist.github.com/renttek/29beaaa1e90909639501


32

Just to repeat the important parts above, Magento 2 applications should use the official Magento 2 APIs, not Zend directly. Thus developers should not care which we build upon. For inquiring minds, Magento 2 uses bits out of different frameworks. We use the database access out of Zend 1. We investigated moving to Doctrine, but it was too much work for the ...


26

Here is what I have. I hope it's enough. Because PE and EE versions can be related to CE versions I think you can figure out the missing values. CE 1.0.19870.4 - ZF 1.5.1 CE 1.1.6 - ZF 1.5.1 CE 1.2.0.1 - ZF 1.7.2 CE 1.3.2.1 - ZF 1.7.2 CE 1.4.0.1 - ZF 1.9.6 CE 1.4.2.0 - ZF 1.10.8 CE 1.5 - CE 1.8 - ZF 1.11.1 CE 1.9 - ZF ...


21

all Zend classes are instantiatet directly, for example here: app/code/core/Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php:726 $page = new Zend_Pdf_Page($xSize, $ySize); This is the reason you can't use any config.xml syntax to change the class itself with an <rewrite /> But the include path is set as expected: /app/code/local:/app/...


17

I don't think you are supposed to use Magento with php 5.6 yet. I assume there will be an official statement when Magento will support php 5.6 and an offical patch if necessary.


17

You need to change lib/Zend/Validate/Hostname.php and replace the internal_encoding related calls with ini_get('default_encoding') and all the other occurences in the Zend framework also...


17

This question may be opinion based but I'm just going to enlight some results from the offical white paper regarding Magento 2 performance and scalability Test Configuration Magento Enterprise Edition 2.0 with PHP7 and Varnish caching Magento Enterprise Edition 1.14.2 with PHP5.6 and Full-Page Caching Comparison between Magento EE 1.14.2 and Magento EE 2....


12

You can use simply following way: \Zend_Debug::dump($someVar)


11

There is no "local code pool override" mechanism anymore. Instead you can use preferences in di.xml for any class that is instantiated by the Magento object manager, i.e. used via Dependency Injection in Magento classes. This is the equivalent to a class rewrite in Magento 1. But for classes like Zend_Date where this is not the case, this is not possible. ...


10

The question was asked many times. It all boils down to return on investment. It is huge effort to migrate, the value is not that high and Magento, because it is including ZF1 as a library in the distribution, just takes responsibility for this library, including patches for issues etc.


9

You need to check customer is loggedin or not. Without customer loggin,you cannot get customer data from session: if (Mage::getSingleton('customer/session')->isLoggedIn()): $customer = Mage::getSingleton('customer/session')->getCustomer(); $customer->getEmail(); $customer->getFirstname(); $customer->getLastname(); $...


9

Here's a quick breakdown of the components: All those are from Zend Framework 2: "zendframework/zend-stdlib": "~2.4.6", "zendframework/zend-code": "~2.4.6", "zendframework/zend-server": "~2.4.6", "zendframework/zend-soap": "~2.4.6", "zendframework/zend-uri": "~2.4.6", "zendframework/zend-validator": "~2.4.6", "zendframework/zend-...


8

AFAIK Magento 2 will not use ZF2. But this is not relevant to your problem. Since there is no backwords compatibility between Magento 2 and Magento 1 all the extensions that exist for Magento 1 will not work for Magento 2 anyway no matter what ZF version is used.


8

Validate your input! As good and as much as you can. Some suggestions for your validation: Check the length of the variable you get via GET-parameter. There's no need to accept a neverending long string. Validate for a domain name. What kind of format do your expected domain names have? Is it always www.mydomain.tld? Create a regex that checks for a match ...


6

In Magento2 - Replaced Zend_Date with native PHP DateTime object/functions. So you can use PHP DateTime function in Magento-2 You can get current date by below code. For Example. $currentDate = (new \DateTime()); echo $currentDate->format('Y-m-d'); You can get more help from : http://php.net/manual/en/ref.datetime.php


5

It is not planned that Magento 2 uses Zend Framework 2 as this GitHub issue proves. There is also no other information regarding this topic in the Magento 2 Wiki.


5

PHP 5.6 deprecated a few functions, especially the one Zend is using: http://de1.php.net/manual/en/migration56.deprecated.php#migration56.deprecated.iconv-mbstring-encoding If I understand this correctly, you just have to set default_encoding, then the call of the method is not needed anymore.


5

As you can see in \Varien_Data_Collection_Db::addFieldToFilter there is no way to achieve what you want, out of the box: public function addFieldToFilter($field, $condition = null) { if (!is_array($field)) { $resultCondition = $this->_translateCondition($field, $condition); } else { $conditions = array(); foreach ($field ...


5

It's a virtual machine for ZF1 unit testing and library development. The package "magento/zendframework1" is based on ZendFramework1 code source . The Vagrantfile is included into zf1 for development using a virtual machine I am not sure, that Vagrant file in zend framework will deal with magento. I would advice to try AlexP's Vagrant project for ...


5

Ok so I got multiple files upload work by using name="review_media[]" as below <input type="file" name="review_media" id="review_media" accept="image/*" multiple="multiple" /> and updated the uploader code to $uploader=$objectManager->create('Magento\MediaStorage\Model\File\Uploader'['fileId'=>'review_media[0]']); review_media[0] represent ...


4

I think this is a very good question, which is connected with how Magento loads classes. There are no good way to fix that without changing Magento files. So the main problem is in lib/Varien/Autoload.php public function autoload($class) { if ($this->_collectClasses) { $this->_arrLoadedClasses[self::$_scope][] = $class; } if ($...


4

I have found the solution anyone needs this. I found the reference from Magento core setup files. //select $select = $installer->getConnection()->select() ->from( array('eo' => $my_table) ); //join $select->reset() ->joinLeft( array('sfo' => $installer->getTable('sales/order')), ...


4

Here is the URL I use successfully for V2 API calls: http://{domain}/index.php/api/v2_soap?wsdl=1 Also make sure you have correct web services user set up in Magento etc. etc. $mage_url = 'http://{domain}/index.php/api/v2_soap?wsdl=1'; $mage_user = 'USERNAME'; //Set in Magento $mage_api_key = 'USERKEY'; //Set in Magento $soap = new SoapClient($mage_url); $...


4

Try Zend_Validate_File_Exists See /lib/Zend/Validate/File/NotExists.php /lib/Zend/Validate/File/Exists.php $validator = new Zend_Validate_File_Exists(); $validator->addDirectory('users/'); if($validator->isValid('testimage.jpg')){ echo "true"; } else { echo "false"; }


4

Please try with: ->order(new Zend_Db_Expr('v.entity_id IS NULL'));


4

Magento 2.0 can be differentiated from its earlier version and has many unique features which can be listed as below: Compatibility with Popular Platforms like MSSQL and Oracle. Enhancement in performance and speed (magento 2.0 is 20 % faster then magento 1.x). There are some significant changes in the structure of directory which reduce the complexity of ...


4

You can create text boxes on admin page by creating form.php in this path yourvendor/modulename/block/form.php Create _prepareForm() function and in that function define the structure of text boxes which you want to create. Firstly you need to create fieldset and using that fieldset you can add new field. For example try below code : protected function ...


4

Giving full permission (775) to var and pub directory after upgrade. Run the command using . chmod -R 775 var pub run php bin/magento setup:di:compile command php bin/magento setup:upgrade clear cache.


4

That means iconv PHP extension is off. Did you setup your server yourself? Contact hosting and tell them to install iconv for you.


4

$now = new DateTime(); $now->setTimezone(new DateTimezone('Europe/Copenhagen')); echo $now->format('Y-m-d H:i:s');


Only top voted, non community-wiki answers of a minimum length are eligible