Skip to content

Upgrade to Laravel 13 and PHP 8.5#8687

Merged
nolanpro merged 57 commits intodevelopfrom
task/FOUR-28803
Apr 10, 2026
Merged

Upgrade to Laravel 13 and PHP 8.5#8687
nolanpro merged 57 commits intodevelopfrom
task/FOUR-28803

Conversation

@nolanpro
Copy link
Copy Markdown
Contributor

@nolanpro nolanpro commented Jan 16, 2026

Needs these too:

https://github.com/ProcessMaker/.github/tree/testbench
Change .github/workflows/deploy-pm4.yml back when merged
https://github.com/ProcessMaker/pm4-k8s-distribution/tree/2026-7-php85
ci:k8s-branch:2026-7-php85

ci:connector-idp:feature/FOUR-30092
ci:connector-pdf-print:feature/FOUR-30092
ci:connector-send-email:feature/FOUR-30092
ci:connector-slack:feature/FOUR-30092
ci:docker-executor-node-ssr:feature/FOUR-30092
ci:modeler:feature/FOUR-30092
ci:package-ab-testing:feature/FOUR-30092
ci:package-actions-by-email:task/FOUR-28803
ci:package-ai:task/FOUR-28803
ci:package-analytics-reporting:task/FOUR-28803
ci:package-api-testing:feature/FOUR-30092
ci:package-auth:task/FOUR-28803
ci:package-collections:task/FOUR-28803
ci:package-comments:feature/FOUR-30092
ci:package-conversational-forms:feature/FOUR-30092
ci:package-decision-engine:task/FOUR-28803
ci:package-email-start-event:task/FOUR-28803
ci:package-photo-video:feature/FOUR-30092
ci:package-pm-blocks:feature/FOUR-30092
ci:package-savedsearch:task/FOUR-28803
ci:package-signature:feature/FOUR-30092
ci:package-smart-extract:task/FOUR-28803
ci:pm4-api-testing:feature/FOUR-30092
ci:screen-builder:feature/FOUR-30092
ci:vue-multiselect:feature/FOUR-30092

ci:deploy
ci:use-packagist-branches
ci:run-testbench

$views = array_map(function ($item) {
return $item['name'];
}, Schema::getViews());
}, Schema::getViews($database));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getViews returns incompatible data structure breaking view logic

High Severity

The getViews() method now returns a numerically-indexed array of view name strings, but consumers expect an associative array keyed by view name with objects having a getSql() method. In shouldCreate(), the check isset($views[$viewName]) will always fail since the array uses numeric keys, causing views to always be recreated unnecessarily. In the up() method's foreach loop, $viewName becomes numeric indices (0, 1, 2...) instead of actual view names, breaking the dropped table detection logic entirely.

Additional Locations (2)

Fix in Cursor Fix in Web

@nolanpro nolanpro changed the title Upgrade to Laravel 12 and PHP 8.5 Upgrade to Laravel 12 and PHP 8.4 Jan 23, 2026
$request->name,
null, // provider
false // confidential
);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OAuth clients not associated with user when created

High Severity

When creating personal access or password grant clients via store(), the new code uses createPersonalAccessGrantClient() and createPasswordGrantClient() which don't associate the client with the authenticated user. The old code passed $request->user()->getKey() to link all client types to the user. Since show(), update(), and destroy() all use findForUser($clientId, $request->user()) to retrieve clients, users can no longer access, modify, or delete personal access and password grant clients they create through this API.

Additional Locations (2)

Fix in Cursor Fix in Web

public function update(Request $request, $clientId)
{
$client = $this->clients->find($clientId);
$client = $this->clients->findForUser($clientId, $request->user());
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OAuth client update/destroy restricted to owner only

Medium Severity

The update and destroy methods changed from $this->clients->find($clientId) to $this->clients->findForUser($clientId, $request->user()). This restricts operations to only clients owned by the requesting user, while the index method still returns ALL clients. Users with edit-auth_clients or delete-auth_clients permissions will see clients in the list but receive 404 errors when attempting to modify clients they don't own, breaking admin management functionality.

Additional Locations (1)

Fix in Cursor Fix in Web

/**
* Store a new client.
*
* @param \Illuminate\Http\Request $request
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicated type-extraction logic in store and update methods

Low Severity

The store() and update() methods contain identical code for extracting $personalAccess, $password, and $redirect from $request->types. These three lines are duplicated verbatim between the two methods. This logic could be extracted to a private helper method like parseClientTypes(Request $request) to reduce duplication and make future maintenance easier.

Additional Locations (1)

Fix in Cursor Fix in Web

@Kookster310
Copy link
Copy Markdown
Contributor

QA server K8S was successfully deployed https://ci-9fdd0aafa1.engk8s.processmaker.net

3 similar comments
@Kookster310
Copy link
Copy Markdown
Contributor

QA server K8S was successfully deployed https://ci-9fdd0aafa1.engk8s.processmaker.net

@Kookster310
Copy link
Copy Markdown
Contributor

QA server K8S was successfully deployed https://ci-9fdd0aafa1.engk8s.processmaker.net

@Kookster310
Copy link
Copy Markdown
Contributor

QA server K8S was successfully deployed https://ci-9fdd0aafa1.engk8s.processmaker.net

@Kookster310
Copy link
Copy Markdown
Contributor

QA server K8S was successfully deployed https://ci-9fdd0aafa1.engk8s.processmaker.net

Copy link
Copy Markdown

@AugustoLopezProcess AugustoLopezProcess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.
Since this branch touches a fairly broad surface area (framework/bootstrap/middleware, Passport, auth flows, and other product changes), I’d suggest treating QA as the main gate here. A regression-style smoke test would be helpful
In particular, it would be great to confirm the following:

  • Web login and session behavior (including cases where a user becomes BLOCKED or INACTIVE after login)
  • API calls using a standard user token
  • Forgot password and reset flows for ACTIVE vs BLOCKED/INACTIVE users (ensuring restricted users don’t get a usable reset path)

@processmaker-sonarqube
Copy link
Copy Markdown

@nolanpro nolanpro merged commit 4a80ede into develop Apr 10, 2026
5 of 7 checks passed
@nolanpro nolanpro deleted the task/FOUR-28803 branch April 10, 2026 20:14
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.

4 participants