-
Notifications
You must be signed in to change notification settings - Fork 2
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
Symfony 4 upgrade #562
Symfony 4 upgrade #562
Conversation
68880f9
to
118967e
Compare
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.
Awesome work so far! I did note quiet a few issues you might need to address.
For example:
- Some of the old, unused folders are still in the project
web
,app
- Swiftmailer is still showing up in config
- See code review below for more details.
MAILER_URL=null://localhost | ||
###< symfony/swiftmailer-bundle ### | ||
|
||
locale=en |
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.
I'm looking at this .env.dist file as a replacement for the parameters.yaml.dist
file. From that perspective:
- I'd love to see all comments that where previously there, instructing a user on how to fill the parameters.
- While at it, please group related parameters (like they where in parameters.yaml.dist) and hence improve readability of this file.
- name: Copy parameters.yml.dist to parameters.yml | ||
run: | | ||
docker-compose -f docker-compose.yml -f docker-compose-ci.yml exec -T php-fpm cp /var/www/html/app/config/parameters.yml.dist /var/www/html/app/config/parameters.yml |
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.
No need to cp .env.dist .env
?
docker-compose.override.yml | ||
app/js/coverage | ||
assets/js/coverage | ||
/build/ |
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.
/build/
stil in action? I thougth encore
drops the web assets in the public/build
folder.
.gitignore
Outdated
/web/build | ||
/web/coverage |
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.
web
folder is outahere right? If it is still in the repo. I think we should actually remove it from VCS!
- name: Delete config | ||
file: path={{spdashboard_data_dir}}/current/app/{{ item }} state=absent | ||
with_items: | ||
- config/parameters.yml | ||
- config/parameters.yaml |
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.
This should not be a thing anymore right? If we need to remove some distributed configuration it should be a .env
file we are removing here?
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.
@quartje as you've been informed of. We are walking away from parameters.yaml
configuration. And started using the .env
way instead. May I ask you to review the changes (or missing changes) to the deployment code (ansible + github actions)? I will try to do so as well, but your Docker evengalist eagle eye will probably spot a thing or two 🦜
@@ -0,0 +1 @@ | |||
{"9628d851-abd1-2283-a8f1-a29ba5036174":{"key":"9628d851-abd1-2283-a8f1-a29ba5036174","issueType":"spd-request-change-request-prod","ticketStatus":"To Do"}} |
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.
This file should not be here right?
@@ -0,0 +1,28 @@ | |||
<?php | |||
|
|||
//use App\Kernel; |
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.
rm -f
?
@@ -33,7 +33,7 @@ class PrivacyQuestions | |||
* @var int | |||
* | |||
* @ORM\Id | |||
* @ORM\Column(type="integer") | |||
* @ORM\Column(type="integer", options={"autoincrement":true}) |
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.
Is this now a required option? Or a dev-left over?
/** @var LoggerInterface $logger */ | ||
$logger = $this->get('logger'); |
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.
🦾 🎖️
templates/Exception/error.html.twig
Outdated
@@ -1,4 +1,4 @@ | |||
{% extends 'base.html.twig' %} | |||
{% extends '../../../../../templates/base.html.twig' %} |
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.
Why are the ../
required here. Given the other templates that can simply extend the base template by its name?
docker/Dockerfiledev
Outdated
@@ -1,6 +1,7 @@ | |||
FROM ghcr.io/openconext/openconext-deploy/openconext-core:feature_build_image_with_teams_included AS openconext | |||
COPY ./conf/prep_oc.sh /usr/local/sbin/prep_oc.sh | |||
COPY ./conf/saml20_sp.json /tmp/saml20_sp.json | |||
#COPY ./conf/saml20_sp.json /tmp/saml20_sp.json |
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.
Also on line 13, we install composer 1 in the fpm
container. But that conflicts with our new composer packages installed. They require composer 2 to install. Please upgrade to composer 2 :)
The jest test still fail as they refer to old, moved fixture files. Should be an easy fix to get a fully green build! |
7b47cc2
to
46f4d7d
Compare
Upgrade Symfony 4 Upgrade Symfony 4
c21875e
to
3a2b53f
Compare
3a2b53f
to
859978a
Compare
These extensions are already installed in OpenConext-containers. No need to waste all the cpu cycles here doing it twice.
Closing this PR, the work is continued on #565 |
* Upgrade Symfony 5 A mighty PR where multiple disciplines entailing the Symfony upgrade come together. Among them: #562 Upgrade to Symfony 4 (in preparation to this SF5 upgrade) #571 Move to Github actions for test integrations At first these tasks where created separate. But to keep things more tight, I chose to merge/rebase them into this branch. Beside an upgrade to this version a major update of the security has been done. Most of the security part is handled within the stepup saml bundle and SPD is a consumer of this implementation. see: https://www.pivotaltracker.com/story/show/173217517 Co-authored-by: Michiel Kodde <mkodde@ibuildings.nl> Co-authored-by: Bart Geesink <bart.geesink@surf.nl>
This is the upgrade from Symfony 3.4 tot Symfony 4.4. The major steps are:
Within Symfony 4 the application and directory structure has changed. The app folder has partly been moved to the config folder en the .env environment. All twig templates have been moved to the templates folder.
Notice the .env contains a parameter administrator_teams used in the dashboard_saml.yaml and checked during compile time in Configuration.php. Previously this was an array, but not supported because of it's dynamic character. The administrator_teams is now a scalar, a string with comma separated values.
See also: https://symfonycasts.com/screencast/symfony4-upgrade/upgrade4