Upgrading

Table of Contents

  1. 1.1.0
    1. Files to Move
    2. Files to Copy
    3. Files to Delete
    4. Files to Manually Update
    5. Code to Refactor
  2. 1.0.0-rc4
    1. Files to Copy
    2. Files to Manually Update
  3. 1.0.0-rc3
    1. Files to Manually Update
  4. 1.0.0-rc1
    1. Classes to Update
  5. 1.0.0-beta7
    1. Files to Copy
    2. Files to Manually Update
  6. 1.0.0-beta6
    1. Files to Delete
    2. Files to Copy
    3. Files to Manually Update

1.1.0

Estimated Upgrade Time: 20 minutes

This release focused on deprecating some of the magical/unnecessary parts of Opulence, adding database migration support, introducing the collection library. It also bumped the minimum supported PHP version to PHP 7.1.

Files to Move

This step isn't strictly necessary, but it may help ease upgrading to future major releases of Opulence. Move src/Project/* to src/* and tests/src/Project/* to /tests/src/*. If you do this, be sure to update the psr-4 setting in composer.json to point to the new location.

Files to Copy

Unless you've customized any of the following files, you can just copy the updated versions from the skeleton project.

Files to Delete

Files to Manually Update

Code to Refactor

This step is not strictly necessary, but it will save time when upgrading to Opulence 2.0.

1.0.0-rc4

Estimated Upgrade Time: 5 minutes

This release focused on fixing unit tests on Windows machines and making it easier to run Opulence on localhost.

Files to Copy

Unless you've customized any of the following files, you can just copy the updated versions from the skeleton project.

Files to Manually Update

1.0.0-rc3

Estimated Upgrade Time: 2 minutes

This release fixed an issue that would prevent users from clearing Opulence's framework cache when bootstrappers were deleted.

Files to Manually Update

Unless you've customized any of the following files, you can just copy the updated versions from the skeleton project.

1.0.0-rc1

Estimated Upgrade Time: 2 minutes

This release removed deprecated classes from previous betas. If you're upgrading from v1.0.0-beta7, then follow the steps below. If you're upgrading from older versions, first upgrade to v1.0.0-beta7.

Classes to Update

The Opulence\Events\Event and IEvent classes do not exist anymore. Instead, your event classes should be plain-old PHP objects (POPO). So, stop extending/implementing Event and IEvent. Any code that may have called stopPropagation() should also be removed. Event listeners that were explicitly accepting an Event or IEvent instance should also be changed to accept any POPO.

1.0.0-beta7

Estimated Upgrade Time: 5 minutes

This beta was mostly about changing Opulence\Environments\Environment to a static class. Additionally, there are some performance boosts and bug fixes. If you're upgrading from v1.0.0-beta6, then follow the steps below. If you're upgrading from an even older version, first upgrade to v1.0.0-beta6.

Files to Copy

Unless you've customized any of the following files, you can just copy the updated versions from the skeleton project.

Files to Manually Update

Update any instances of $environment->getVar(...) to \Opulence\Environments\Environment::getVar(...) and $environment->setVar(..., ...) to \Opulence\Environments\Environment::setVar(..., ...) in the following files:

Update $environment->getName() to \Opulence\Environments\Environment::getName() in the following file:

Remove $container->bindInstance(Environment::class, $environment); from config/application.php

Remove $this->environment = require __DIR__ . "/../../../../../config/environment.php"; from the following files:

1.0.0-beta6

Estimated Upgrade Time: 20-40 minutes

This beta primarily focused on the overhauling of bootstrappers. Bootstrappers now reside in the Ioc library, and no longer have dependencies on the Opulence\Applications\Tasks\Dispatchers\ITaskDispatcher, Opulence\Bootstrappers\Paths, or Opulence\Environments\Environment classes.

Files to Delete

The following files need to be deleted manually from your server:

Files to Copy

Unless you've customized any of the following files, you can just copy the updated versions from the skeleton project. Just be sure not to overwrite namespace {PROJECT_NAME}\...; at the top of your classes.

Files to Manually Update