3 replaced http://magento.stackexchange.com/ with https://magento.stackexchange.com/
source | link

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.

However you could create a composer package that loads your own Zend_Date class before the real one is loaded via autoloading:

composer.json

{
    "name": "your/custom-date",
    "autoload": {
      "files": ["src/lib/Zend/Date.php"]
    }
}

src/lib/Zend/Date.php

class Zend_Date
{
    ...
}

EditEdit: After you edited a composer.json file, run composer dump-autoload to update the autoloader.

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.

However you could create a composer package that loads your own Zend_Date class before the real one is loaded via autoloading:

composer.json

{
    "name": "your/custom-date",
    "autoload": {
      "files": ["src/lib/Zend/Date.php"]
    }
}

src/lib/Zend/Date.php

class Zend_Date
{
    ...
}

Edit: After you edited a composer.json file, run composer dump-autoload to update the autoloader.

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.

However you could create a composer package that loads your own Zend_Date class before the real one is loaded via autoloading:

composer.json

{
    "name": "your/custom-date",
    "autoload": {
      "files": ["src/lib/Zend/Date.php"]
    }
}

src/lib/Zend/Date.php

class Zend_Date
{
    ...
}

Edit: After you edited a composer.json file, run composer dump-autoload to update the autoloader.

2 Added your comment to the end of your post because of its importance.
source | link

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.

However you could create a composer package that loads your own Zend_Date class before the real one is loaded via autoloading:

composer.json

{
    "name": "your/custom-date",
    "autoload": {
      "files": ["src/lib/Zend/Date.php"]
    }
}

src/lib/Zend/Date.php

class Zend_Date
{
    ...
}

Edit: After you edited a composer.json file, run composer dump-autoload to update the autoloader.

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.

However you could create a composer package that loads your own Zend_Date class before the real one is loaded via autoloading:

composer.json

{
    "name": "your/custom-date",
    "autoload": {
      "files": ["src/lib/Zend/Date.php"]
    }
}

src/lib/Zend/Date.php

class Zend_Date
{
    ...
}

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.

However you could create a composer package that loads your own Zend_Date class before the real one is loaded via autoloading:

composer.json

{
    "name": "your/custom-date",
    "autoload": {
      "files": ["src/lib/Zend/Date.php"]
    }
}

src/lib/Zend/Date.php

class Zend_Date
{
    ...
}

Edit: After you edited a composer.json file, run composer dump-autoload to update the autoloader.

1
source | link

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.

However you could create a composer package that loads your own Zend_Date class before the real one is loaded via autoloading:

composer.json

{
    "name": "your/custom-date",
    "autoload": {
      "files": ["src/lib/Zend/Date.php"]
    }
}

src/lib/Zend/Date.php

class Zend_Date
{
    ...
}