-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Initialize full Symfony layout in Back Office #32235
Closed
Closed
Changes from all commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
9a2126e
Add feature flag for Symfony layout
jolelievre a9d1507
Create based twig layout, most of the layout variables are initialize…
jolelievre bb427ee
Make LayoutExtension more resilient in CLI environment
jolelievre 5c170c4
introduce LegacyController that allows rendering a smarty template vi…
jolelievre 5e8ec2f
Add dedicated SymfonyLayoutFeature to check if symfony layout is enabled
jolelievre 83558cc
LegacyContext no longer creates a legacy controller when symfony layo…
jolelievre 963e696
Include all missing components in default layout
jolelievre 5383b33
Hande page header toolbar
jolelievre 5ad9fdd
Define interface for symfony layout feature which allows disabling it…
jolelievre 79d5459
Fix js files integration, configurators must be executed in the appro…
jolelievre 0bc5470
Fix setMedia to matcgh recent changes
jolelievre 3dfe642
Fix feature flag controller redirection
jolelievre 9f23933
Fix notifications API access
jolelievre d6ed479
Handle lite layout and correctly hide header when needed
jolelievre 2656949
Add sanity tests run with symfony layout enabled only when Symfony la…
jolelievre 6c343e8
Trigger worflow even without label to test
jolelievre ae24cee
Handle controller_type in bridge controller
jolelievre b7acb9e
Preset global variables use by global layout
jolelievre d6b8ba2
Handle correctly layoutTitle and toolbar class
jolelievre 3d5810c
Handle symfony layout via environment variable, set it for sanity tests
jolelievre 5429ec4
Load .env to allow setting env variables for UI tests
jolelievre c70592b
Prevent double assignation of PHP constant
jolelievre 8664f4f
Symfony layout can be disabled via query parameter
jolelievre 65e4b7c
Run product page V2 with symfony layout as well
jolelievre 2398c32
Handle custom metaTitle and special title of Order correctly
jolelievre 35a07a4
Handle proper fallback for meta title
jolelievre 5d855b5
Use configuration as the default table value just like in AminControl…
jolelievre 7011f1d
Fix product pagination on v1, and hide header feature in default layout
jolelievre a631847
Make sure the symfony toolbar is correctly closed
jolelievre b175f8e
Force closing toolbar before creating a product
jolelievre d07a5cc
Remove legacy const and classes from services
jolelievre f664454
Clean PHPStan errors a bit more
jolelievre 9037833
Update PHPStan baseline
jolelievre c4a9bf6
Sanity for symfonylayout only on PHP 8.1
jolelievre 55185da
Enable symfony layout via feature flag command
jolelievre 889c887
Run sanity tests without installation part
jolelievre 2ffd1dc
Auto install
jolelievre c9723cb
Do not run product sanity tests
jolelievre d047953
Run product v1 tests
jolelievre ea54584
Run v1 and v2
jolelievre 42135dc
One at a time
jolelievre c893307
Display dev logs
jolelievre 09d7fb8
plop
jolelievre 280752e
Improve artifact upload and warmup cache
jolelievre 9a2b1a9
Disable dev mode
jolelievre 04b5cd8
Adapt FrameworkBundleAdminControllerTest
jolelievre 5134d10
Update DotEnv initialization
jolelievre d586638
Replace smart controller component with Twig function
jolelievre eb02e45
Use str_starts_with
jolelievre 7f04c4c
Change name of Sanity with symfony layout so it's not matching the re…
jolelievre 4b085e8
Rector fix
jolelievre 3a70d97
Setup USE_SYMFONY_LAYOUT in docker-compose.yml
jolelievre cd403a6
Use .env file to enable symfony layout
jolelievre 27c4977
Make SymfonyLayoutExtension more resilient to the absence of request
jolelievre 55d15f3
Improve sanity symfony tests
jolelievre File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: UI tests (Symfony layout) | ||
on: [ push, pull_request ] | ||
permissions: | ||
contents: read # to fetch code (actions/checkout) | ||
concurrency: | ||
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
sanity: | ||
permissions: | ||
contents: read # to fetch code (actions/checkout) | ||
runs-on: ubuntu-latest | ||
name: Sanity Symfony Layout | ||
strategy: | ||
matrix: | ||
php: [ '8.1' ] | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup environment | ||
uses: ./.github/actions/setup-prestashop-env | ||
with: | ||
php-version: ${{ matrix.php }} | ||
mysql-version: '5.7' | ||
mysql-database: 'prestashop' | ||
mysql-root-password: 'password' | ||
node-version: '16' | ||
npm-version: '7' | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
backoffice-layout: symfony | ||
|
||
- name: Cache Playwright browsers | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/ms-playwright/ | ||
key: ${{ runner.os }}-browsers | ||
|
||
- name: Use .env.ci | ||
run: mv .env.ci .env | ||
working-directory: ./tests/UI | ||
|
||
- name: Run tests even with install since the symfony layout is enabled via .env | ||
run: npm ci && npm run test:sanity:fast-fail && npm run test:sanity:productV2:fast-fail | ||
working-directory: ./tests/UI | ||
env: | ||
ENABLE_SSL: true | ||
|
||
- uses: actions/upload-artifact@v3 | ||
if: ${{ always() }} | ||
with: | ||
name: artifacts-${{ matrix.php }} | ||
path: | | ||
./tests/UI/screenshots/ | ||
var/logs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -214,3 +214,5 @@ tools/build/releases/* | |
# Docker configuration | ||
install.lock | ||
docker-compose.override.yml | ||
|
||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,13 +12,16 @@ parameters: | |
translator.class: PrestaShopBundle\Translation\Translator | ||
translator.data_collector: PrestaShopBundle\Translation\DataCollectorTranslator | ||
prestashop_views: "%kernel.project_dir%/src/PrestaShopBundle/Resources/views" | ||
# This is hard-coded for now but it should be dynamic wince admin folder name changes in prod environments | ||
admin_themes_folder: "%kernel.project_dir%/admin-dev/themes" | ||
admin_page: "%prestashop_views%/Admin" | ||
env(PS_LOG_OUTPUT): "%kernel.logs_dir%/%kernel.environment%.log" | ||
env(PS_LOG_MAX_FILES): '30' | ||
mail_themes_uri: "/mails/themes" | ||
mail_themes_dir: "%kernel.project_dir%%mail_themes_uri%" | ||
modules_translation_paths: [ ] | ||
api_base_path: !php/const PrestaShopBundle\Api\Api::API_BASE_PATH | ||
env(USE_SYMFONY_LAYOUT): 'false' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should put this in the .env no? |
||
|
||
# Autowires Core controllers | ||
services: | ||
|
@@ -85,6 +88,7 @@ twig: | |
'%kernel.project_dir%/modules': Modules | ||
'%mail_themes_dir%': MailThemes | ||
'%prestashop_views%': PrestaShopCore | ||
'%admin_themes_folder%': AdminThemes | ||
globals: | ||
webpack_server: false | ||
multistore_field_prefix: !php/const PrestaShopBundle\Service\Form\MultistoreCheckboxEnabler::MULTISTORE_FIELD_PREFIX | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
imports: | ||
- { resource: ../common.yml } | ||
|
||
services: | ||
PrestaShopBundle\Bridge\SymfonyLayoutFeatureInterface: | ||
class: PrestaShopBundle\Bridge\DisabledSymfonyLayoutFeature |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about .env.local, .env.*.local ... ?