Manual Update Instructions


This section lists the steps to upgrade to a next version that introduced a breaking change, thus rendering the Photon update command useless. Photon update command only updates you to a latest bug-fix version, but also helps greatly in the manual upgrade process.

Table of Contents
  1. Upgrading from v.1.1.* to v.1.2.*

Upgrading from v.1.1.* to v.1.2.*

Follow these steps to update from v.1.1.* to the v.1.2.* version:

1. Run php artisan photon:update --force

2. Edit /config/photon.php file and update these 4 values:

/*
    |--------------------------------------------------------------------------
    | Photon core jobs directory
    |--------------------------------------------------------------------------
    |
    | Location of photon core jobs
    |
    */
    'core_jobs_dir' => app_path('/PhotonCms/Core/ScheduledJobs'),
    /*
    |--------------------------------------------------------------------------
    | Photon core jobs namespace
    |--------------------------------------------------------------------------
    |
    | Namespace prefix of photon core jobs
    |
    */
    'core_jobs_namespace' => 'Photon\PhotonCms\Core\ScheduledJobs\\',
    /*
    |--------------------------------------------------------------------------
    | Photon jobs directory
    |--------------------------------------------------------------------------
    |
    | Location of photon jobs
    |
    */
    'jobs_dir' => app_path('/PhotonCms/Dependencies/ScheduledJobs'),
    /*
    |--------------------------------------------------------------------------
    | Photon jobs namespace
    |--------------------------------------------------------------------------
    |
    | Namespace prefix of photon jobs
    |
    */
    'jobs_namespace' => 'Photon\PhotonCms\Dependencies\ScheduledJobs\\',

3. Edit composer.json and add this to the end of your required array:

"aws/aws-sdk-php": "^3.69"

4. Edit /app/PhotonCms/Dependencies/ModuleExtensions/UserModuleExtensions.php and add this method to it:

    public function interruptLogin()
    {
        $email = $this->requestData['email'];
        $user = User::where('email', $email)->first();
        if(!$user || $user->locked) {
            throw new PhotonException('USER_LOGIN_FAILURE_INVALID_CREDENTIALS');            
        }
    }

Also add to the same class implementation of this interface:

use Photon\PhotonCms\Core\Entities\DynamicModuleExtension\Contracts\ModuleExtensionCanInterruptLogin;
....
class UserModuleExtensions extends BaseDynamicModuleExtension implements
    ....
    ModuleExtensionCanInterruptLogin,
    ....
{
....

Sign-up to stay informed about news and updates.