Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding migration that will replace root_dir variable with project_dir #12526

Merged
merged 2 commits into from Jun 28, 2023

Conversation

escopecz
Copy link
Sponsor Member

Q A
Bug fix? (use the a.b branch) [y]
New feature/enhancement? (use the a.x branch) [ ]
Deprecations? [ ]
BC breaks? (use the c.x branch) [ ]
Automated tests included? [ ]
Related user documentation PR URL mautic/mautic-documentation#...
Related developer documentation PR URL mautic/developer-documentation#...
Issue(s) addressed Fixes #12516

Description:

In #11145 we've changed all values of %root_dir% to %project_dir% but this still must be done in local.php during upgrade from M4 to M5 so users don't have to panic when the Mautic instance will be broken due to this issue.

Steps to test this PR:

  1. Open this PR on Gitpod or pull down for testing locally (see docs on testing PRs here)
  2. Add these lines to your local.php:
        'testing_path1' => '%kernel.root_dir%/../../var/tmp',
	'testing_path2' => 'some/%kernel.root_dir%/var/tmp',

These are the 2 options being replaced in #11145.
3. Run bin/console doctrine:migrations:migrate. You may have to hit the Enter if you are asked some question.
4. Once the migration has run, your local.php values should be changed to:

        'testing_path1' => '%kernel.project_dir%/../var/tmp',
	'testing_path2' => 'some/%kernel.project_dir%/app/var/tmp',

@escopecz escopecz added the bug Issues or PR's relating to bugs label Jun 27, 2023
@escopecz escopecz added this to the 5.0-beta milestone Jun 27, 2023
@escopecz escopecz requested a review from fedys June 27, 2023 14:32
@codecov
Copy link

codecov bot commented Jun 27, 2023

Codecov Report

Merging #12526 (de40f24) into 5.x (3a3698a) will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##                5.x   #12526      +/-   ##
============================================
- Coverage     57.28%   57.28%   -0.01%     
  Complexity    33535    33535              
============================================
  Files          2158     2158              
  Lines        101350   101350              
============================================
- Hits          58057    58056       -1     
- Misses        43293    43294       +1     

see 1 file with indirect coverage changes

Copy link
Member

@fedys fedys left a comment

Choose a reason for hiding this comment

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

Thanks @escopecz 👍

@escopecz escopecz merged commit 9184d25 into mautic:5.x Jun 28, 2023
13 of 14 checks passed
@escopecz escopecz deleted the migration-for-root_dir branch June 29, 2023 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues or PR's relating to bugs
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Write a migration for %root_dir% usages in local.php
2 participants