Skip to content

Conversation

@nolanpro
Copy link
Contributor

@nolanpro nolanpro commented Jan 6, 2026

This pull request includes the changes for upgrading to Laravel 12.x. Feel free to commit any additional changes to the shift-164320 branch.

Before merging, you need to:

  • Checkout the shift-164320 branch
  • Review all pull request comments for additional changes
  • Run composer update (if the scripts fail, try with --no-scripts)
  • Clear any config, route, or view cache
  • Thoroughly test your application (no tests?, no CI?)

If you get stuck, never hesitate to email support. If you need more help with your upgrade, check out the Human Shifts.

Accessing Faker properties was deprecated in Faker 1.14.
Laravel 8 adopts the tuple syntax for controller actions. Since the old options array is incompatible with this syntax, Shift converted them to use modern, fluent methods.
In an effort to make upgrading the constantly changing config files easier, Shift defaulted them and merged your true customizations - where ENV variables may not be used.
From the [PHPUnit 8 release notes][1], the `TestCase` methods below now declare a `void` return type:

- `setUpBeforeClass()`
- `setUp()`
- `assertPreConditions()`
- `assertPostConditions()`
- `tearDown()`
- `tearDownAfterClass()`
- `onNotSuccessfulTest()`

[1]: https://phpunit.de/announcements/phpunit-8.html
@nolanpro
Copy link
Contributor Author

nolanpro commented Jan 6, 2026

⚠️ Shift detected you have not adopted the new application configuration and streamlined structure available in Laravel 11. While your legacy application may still run on Laravel 12, you may use the Laravel Slimmer to automate these changes. Doing so will no only slim your codebase, but allow you to follow the latest conventions from the documentation.

After running the Laravel Slimmer, you may email support to rerun this Shift.

@nolanpro
Copy link
Contributor Author

nolanpro commented Jan 6, 2026

⚠️ Shift detected a custom namespace. Laravel now recommends keeping the default App namespace. Unfortunately the app:name command was removed in Laravel 6.0. However, for the most part you may do a simple search and replace to change the namespace.

Shift recommends changing this to align with the latest Laravel conventions and improve Shift's automation. After doing so, you may request a rerun of this Shift.

@nolanpro
Copy link
Contributor Author

nolanpro commented Jan 6, 2026

ℹ️ Laravel 9 moved the resources/lang folder to the top level of the project. While Shift automated this change, you may have additional references to the previous folder which need to be updated.

@nolanpro
Copy link
Contributor Author

nolanpro commented Jan 6, 2026

ℹ️ Starting with Laravel 10, the lang folder is no longer included in a default Laravel application. Laravel now recursively merges any customizations with framework defaults.

Shift streamlined your language files by removing options that matched the Laravel defaults and preserving your customizations. If you wish to keep the full set of language, Shift recommends running artisan lang:publish --force to get the latest configuration files from Laravel, then reapplying the customizations Shift streamlined.

@nolanpro
Copy link
Contributor Author

nolanpro commented Jan 6, 2026

⚠️ Shift upgraded your configuration files by defaulting them and merging your true customizations. These include values which are not changeable through core ENV variables.

You should review this commit for additional customizations or opportunities to use new ENV variables. If you have a lot of customizations, you may undo this commit with git revert 10b94c0f and make the config file changes manually.

@nolanpro
Copy link
Contributor Author

nolanpro commented Jan 6, 2026

ℹ️ Shift detected customized options within your configuration files which may be set with an ENV variable. To help keep your configuration files streamlined, you may set the following variables. Be sure adjust any values per environment.

BCRYPT_ROUNDS=10
CACHE_STORE=redis
DB_CONNECTION=processmaker
LOG_DAILY_DAYS=7
LOG_STACK=daily
MAIL_FROM_ADDRESS=admin@example.com
MAIL_FROM_NAME=ProcessMaker
MAIL_HOST=smtp.mailgun.org
MAIL_MAILER=smtp
MAIL_PORT=587
PUSHER_APP_ID=app-id
PUSHER_APP_KEY=app-key
PUSHER_APP_SECRET=app-secret
REDIS_CACHE_CONNECTION=default

Note: some of these may simply be values which changed between Laravel versions. You may ignore any ENV variables you do not need to customize.

@nolanpro
Copy link
Contributor Author

nolanpro commented Jan 6, 2026

ℹ️ Shift detected your application uses custom ENV variables for configuration options which have ENV variables in Laravel. Shift recommends renaming the following variables to use the one provided by Laravel:

  • BROADCAST_DRIVER to BROADCAST_CONNECTION
  • CACHE_DRIVER to CACHE_STORE

@nolanpro
Copy link
Contributor Author

nolanpro commented Jan 6, 2026

ℹ️ Shift detected customized options within your configuration files which may be set with an ENV variable. To help keep your configuration files streamlined, you may set the following variables. Be sure adjust any values per environment.

BCRYPT_ROUNDS=10
CACHE_STORE=redis
DB_CONNECTION=processmaker
LOG_DAILY_DAYS=7
LOG_STACK=daily
MAIL_FROM_ADDRESS=admin@example.com
MAIL_FROM_NAME=ProcessMaker
MAIL_HOST=smtp.mailgun.org
MAIL_MAILER=smtp
MAIL_PORT=587
PUSHER_APP_ID=app-id
PUSHER_APP_KEY=app-key
PUSHER_APP_SECRET=app-secret
REDIS_CACHE_CONNECTION=default

Note: some of these may simply be values which changed between Laravel versions. You may ignore any ENV variables you do not need to customize.

@nolanpro
Copy link
Contributor Author

nolanpro commented Jan 6, 2026

ℹ️ Shift detected your application uses custom ENV variables for configuration options which have ENV variables in Laravel. Shift recommends renaming the following variables to use the one provided by Laravel:

  • BROADCAST_DRIVER to BROADCAST_CONNECTION
  • CACHE_DRIVER to CACHE_STORE

@nolanpro
Copy link
Contributor Author

nolanpro commented Jan 6, 2026

ℹ️ Laravel 12 removed the MAIL_ENCRYPTION environment variable. While a new MAIL_SCHEME environment variable was introduced, its available options are not the same. Your application will likely behave correctly with the new default values. However, if you were setting MAIL_ENCRYPTION to tls, you may want to review this Mastering Laravel Tip for more details.

@nolanpro
Copy link
Contributor Author

nolanpro commented Jan 6, 2026

⚠️ Laravel 12 changed the default values of the CACHE_PREFIX, REDIS_PREFIX, and SESSION_COOKIE to use dashes (-) instead of underscores (_). If you were not explicitly setting these environment variables, your application will use these new default values - which may result in unexpected behavior. For example, temporary cache misses or forced log out.

If your application uses cache prefixes or session cookies and you were not explicitly setting these ENVs, you may set them to their previous defaults to avoid any unexpected behavior.

@nolanpro
Copy link
Contributor Author

nolanpro commented Jan 6, 2026

⚠️ Laravel 12 removed the APP_TIMEZONE environment variable. The timezone now defaults to UTC. Shift removed this variable from your .env file since it was set to UTC.

Shift detected additional references to the APP_TIMEZONE environment variable in the following files. You should remove the environment variable and, if necessary, reference the app.timezone configuration option instead.

  • ProcessMaker/Console/Commands/Install.php
  • config/app.php

@nolanpro
Copy link
Contributor Author

nolanpro commented Jan 6, 2026

⚠️ The HasUuids trait now returns a UUIDv7 in Laravel 12. Previously this returned a UUIDv4. To preserve compatibility with your existing model's IDs, Shift converted your traits to use their specific versions.

@nolanpro
Copy link
Contributor Author

nolanpro commented Jan 6, 2026

ℹ️ Laravel added a composer run dev script which starts php artisan serve, php artisan queue:listen --tries=1, php artisan pail, and npm run dev all in one command.

Shift has added this script, as well as the necessary packages. Once you run composer update and npm install, you will be able to use the new composer run dev script.

@nolanpro
Copy link
Contributor Author

nolanpro commented Jan 6, 2026

ℹ️ Laravel added a composer run setup script which runs commands like composer install, npm install, and others to set up your Laravel application. You are encouraged to customize this script for your project.

@nolanpro
Copy link
Contributor Author

nolanpro commented Jan 6, 2026

ℹ️ Laravel added a composer run test script which runs the new php artisan config:clear command, then php artisan test. This is provided as a convenience. You are welcome to customize this script for your test suite.

@nolanpro
Copy link
Contributor Author

nolanpro commented Jan 6, 2026

ℹ️ Shift updated your dependencies for Laravel 12. While many of the popular packages are reviewed, you may have to update additional packages in order for your application to be compatible with Laravel 12. Watch dealing with dependencies for tips on handling any Composer issues.

The following dependencies were updated by a major version and may have their own changes. You may check their changelog for any additional upgrade steps.

The following dependencies were not updated by Shift and may be incompatible. If Composer lists one of these packages as a problem, you should check for a newer version.

The following dependencies are now abandoned. You will need to remove or replace them to complete your upgrade.

@nolanpro
Copy link
Contributor Author

nolanpro commented Jan 6, 2026

ℹ️ Laravel 9 adopted anonymous migrations. Shift automated this change to align with modern Laravel conventions and avoid naming migrations.

@nolanpro
Copy link
Contributor Author

nolanpro commented Jan 6, 2026

⚠️ Laravel 10 has added a return type of array to the Event broadcastOn and Notification via methods. However, you may still return a single channel from these methods.

Shift added the array return type to these methods in the following classes. You should review them to ensure you are returning an array, or remove the return type.

  • ProcessMaker/Events/ImportLog.php
  • ProcessMaker/Events/RedirectToEvent.php
  • ProcessMaker/Notifications/ActivityActivatedNotification.php
  • ProcessMaker/Notifications/ActivityCompletedNotification.php
  • ProcessMaker/Notifications/ApplyActionNotification.php
  • ProcessMaker/Notifications/BundleUpdatedNotification.php
  • ProcessMaker/Notifications/ErrorExecutionNotification.php
  • ProcessMaker/Notifications/FileReadyNotification.php
  • ProcessMaker/Notifications/ImportReady.php
  • ProcessMaker/Notifications/InboxRulesNotification.php
  • ProcessMaker/Notifications/ProcessCanceledNotification.php
  • ProcessMaker/Notifications/ProcessCompletedNotification.php
  • ProcessMaker/Notifications/ProcessCreatedNotification.php
  • ProcessMaker/Notifications/ProcessTranslationReady.php
  • ProcessMaker/Notifications/SassCompiledNotification.php
  • ProcessMaker/Notifications/ScriptResponseNotification.php
  • ProcessMaker/Notifications/TaskOverdueNotification.php
  • ProcessMaker/Notifications/TaskReassignmentNotification.php
  • ProcessMaker/Notifications/TwoFactorAuthNotification.php

@nolanpro
Copy link
Contributor Author

nolanpro commented Jan 6, 2026

ℹ️ Starting with Laravel 10, PHP type hints were added within classes included in a Laravel application. In an effort to modernize your code, Shift automated this change where Laravel strictly specifies a type. If you prefer not to type hint your code you may revert this commit by running: git revert 09c02bfc

@nolanpro
Copy link
Contributor Author

nolanpro commented Jan 6, 2026

ℹ️ All of the underlying Symfony components used by Laravel have been upgraded to Symfony 7.2. Shift detected references to Symfony classes within your application. These are most likely type hints and can safely be ignored. If you are using Symfony classes directly or experience issues relating to Symfony, you should review the Symfony change log for any additional changes.

@nolanpro
Copy link
Contributor Author

nolanpro commented Jan 6, 2026

ℹ️ If you are using the Laravel installer CLI tool to create new Laravel applications with laravel new, you should updated to the latest version to receive updates for Laravel 12 and the new starter kits.

You may update your installer by running:

composer global require laravel/installer

@nolanpro
Copy link
Contributor Author

nolanpro commented Jan 6, 2026

⚠️ Laravel 12 no longer includes the SVG image type when performing image validation. If your application allows SVG images, you should review your image validation rules and update them to use the new allow_svg option.

'cover' => ['required', 'image:allow_svg'],
'avatar' => ['required', File::image(allowSvg: true)],

@nolanpro
Copy link
Contributor Author

nolanpro commented Jan 6, 2026

❌ Several of the Schema methods changed in Laravel 12. The getTables, getViews, getTypes, getTableListing methods now returns all schemas (databases). In addition, the getTableListing method returns the schema-qualified table name (e.g. database.table).

Shift detected potential uses of these methods in the following files. You should review these instances to see if you need to preserve the original behavior. You may review the documentation on Multi-Schema Database Inspecting for more information.

  • ProcessMaker/Console/Commands/CreateDataLakeViews.php
  • ProcessMaker/ImportExport/Manifest.php
  • tests/unit/ProcessMaker/MediaOrderColumnIndexTest.php

@nolanpro
Copy link
Contributor Author

nolanpro commented Jan 6, 2026

ℹ️ The container now respects the default value of constructor parameters when resolving a class instance. If you were previously relying on the container to set a value, you will need to pass in this value when resolving the class instead.

@nolanpro
Copy link
Contributor Author

nolanpro commented Jan 6, 2026

⚠️ Shift detected you are using a Laravel package like Horizon or Nova which may need to have its published assets regenerated after upgrading. Be sure to use artisan to republish these assets as well as php artisan view:clear to avoid any errors.

@nolanpro
Copy link
Contributor Author

nolanpro commented Jan 6, 2026

🎉 Congratulations, you're now running the latest version of Laravel!

Next, you may optionally run the following Shifts to ensure your application is fully upgraded, adopts the latest Laravel conventions, and easier to maintain in the future:

  • Laravel Fixer automatically updates your code to the latest Laravel conventions.
  • Tests Generator intelligently generates model factories, HTTP Tests, and configuration for your application.
  • CI Generator intelligently generates CI jobs to lint PHP, check code style, and run tests, including Dusk.

You may also use the Shift Workbench to automate common tasks for maintaining your Laravel application.

@nolanpro
Copy link
Contributor Author

nolanpro commented Jan 6, 2026

❌ PHP syntax errors were detected after running your Shift. Often these are simply differences between the PHP version on the Shift server (8.2) and your project. Occasionally they are misplaced lines or duplicate import statements.

You may quickly check the PHP syntax locally by running php -l on the following files:

  • ProcessMaker/Console/Commands/AuthSetPassword.php
  • ProcessMaker/Console/Commands/Install.php
  • ProcessMaker/Console/Commands/TenantsEnable.php
  • ProcessMaker/Console/Commands/TranslateEmptyStrings.php
  • ProcessMaker/Console/Commands/UpdateSettingsGroupId.php
  • database/seeders/ScreenEmailSeeder.php
  • database/seeders/ScreenSystemSeeder.php
  • tests/Feature/SecurityLoggerTest.php
  • tests/Jobs/BpmnActionFindInstanceWithRetryTest.php

@processmaker-sonarqube
Copy link

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants