1 of 32

Public OSS demo

Welcome!

​

​

​

​

​

June - Session 4 of 2022

01/06/2022

2 of 32

Hello!

​

Marco Salvatore

Tech Evangelist Italy & Contributor

Thomas Baccelli

Core Maintainer

Mathieu Ferment

Tech Manager & Maintainer

Krystian Podemski

Tech Evangelist Poland & Maintainer

Hugues Gobet

Contributor

3 of 32

Today’s agenda

​

Introduction

  • Event rules

​

Project news

  • Release of PrestaShop 1.7.8.6
  • Two new roles introduced in the project (scoped-maintainer and committer)
  • Daniel Hlavacek, @Hlavtox, joins as a scoped-maintainer, responsible for a new PrestaShop theme and front-end stuff in the project

​

Demos

  • Update on the Horizontal migration by @matks and @tegbessou
  • PHP 8.1 compatibility by @atomix
  • Improvements for Email alerts module by @marsaldev
  • Update on the Hummingbird theme by @Hlavtox�

Q&A

​

4 of 32

Event rules

​

  1. Please use the chat to ask questions.�The video stream is ~1 min delayed – don’t wait until the end of the stream to post your questions!�
  2. This event is about the PrestaShop open source project.�PrestaShop company is off topic.�

​

  • This event is public and recorded.�Record will be shared publicly.��
  • Participants must abide by the Code of Conduct of PrestaShop project.��

Code of Conduct can be read at https://www.prestashop-project.org/code-of-conduct/

5 of 32

Project news

6 of 32

PrestaShop 1.7.8.6

PrestaShop 1.7.8.6 has been delivered on the 17th of May.

​

This release fixes 6 bugs and regressions reported on version 1.7.8.5, including two major and four minor fixes.�

Full release notes are available on build.prestashop.com

​

​

7 of 32

Project update- new roles

Committers��Committers participate in reviewing code contributions and are able to merge them in the project once they have been accepted and verified.

​

Scoped-maintainers�

Scoped Maintainers have the same mission as Project Maintainers, but over a limited scope (e.g. a project, a repository, or a technology).

​

If the scope is one or multiple repositories, maintainers rights are granted only on these repositories. If the scope is larger (example: being in charge of a folder inside a repository) maintainer rights are granted on the repository and the scoped maintainer is trusted not to abuse.

​

Want to apply?

​

https://www.prestashop-project.org/maintainers-guide/how-to-become-a-committer/

​

https://www.prestashop-project.org/maintainers-guide/how-to-become-a-maintainer/

8 of 32

Daniel Hlavacek joins as our first scoped-maintainer

Let’s welcome Daniel as a first scoped-maintainer in the project!

​

9 of 32

Demos

​

10 of 32

Demo #1

Update on the Horizontal migration

by @matks and @tegbessou

�

11 of 32

12 of 32

PrestaShop Symfony migration started in 2015.��Objective: replace PrestaShop’s in-house web framework with Symfony.

We want to change the migration process.��to deliver gradual improvements in all the back-office

13 of 32

The final goal is still the same:

PrestaShop + Symfony + Twig + CQRS + Form&Grid

But instead of delivering 5/5 technology upgrades on 1 page��We want to deliver 1/5 technology upgrade�on (almost) every page�

…then the second…�…then the third…

14 of 32

Our roadmap (so far)

​

  1. Proof of concept: migrate a listing (HelperList) to Symfony�
  2. Proof of concept: migrate a form (HelperForm) to Symfony�
  3. Migrate eligible BO pages to Symfony�
  4. Proof of concept: replace Smarty by Twig�
  5. ?

Today’s demo

15 of 32

PR presentation

  • AdminController namespace

​

  • Action namespace

​

  • Field namespace

​

  • LegacyControllerBridgeInterface and LegacyListControllerBridgeInterface

​

  • Helper namespace

​

  • Smarty namespace

​

  • …

16 of 32

Fix remaining reviews

  • Create a bridge object and pass it to Hook

​

  • Create a new way to initialize controller configuration

​

  • Replace some URLs in template variables

​

  • Remove the isNewTheme variable and all usages

​

  • …

17 of 32

Next steps

  • Validate the PR with QA

​

  • Merge the PR

​

  • Update documentation with review adaptation

​

  • Push the documentation

​

  • Migrate another list with the documentation

​

  • Create the horizontal migration form

18 of 32

Demo #2

PHP 8.1 compatibility by @atomix

�

19 of 32

It’s done!

🎉

20 of 32

What’s included?

21 of 32

Why BC Breaks?

Since PHP 8.1, a lot of internal methods have now a “return type”

Valid in PHP <= 8.0

Deprecated since PHP 8.1

Valid in PHP 8.1

22 of 32

What about mixed return type?

Mixed as a return type is allowed since PHP 8.0 only

#[\ReturnTypeWillChange] as a workaround

23 of 32

prestashop/laminas-code-lts

  • No version of laminas-code is compatible with the range of PrestaShop (from PHP 7.2 to 8.1).

​

  • A fork of the latest version has been made

​

  • Syntax not compatible with PHP >= 7.2 has been rewritten to make it compatible

24 of 32

Other changes

  • A lot of deprecations fixed (using null when string is needed)

​

  • PHPUnit compatibility (~8.5.16 || ~9.5.10)

25 of 32

Demo #3

Improvements for Email alerts module

by @marsaldev

�

26 of 32

The issue opened

(2 years ago 😅)

27 of 32

The previous behaviour

Until v2.3.3

28 of 32

The new behaviour

Since v2.4.0

29 of 32

Another improvement by @lmeyer1

Since v2.4.0

30 of 32

Demo #4

Update on the Hummingbird theme

by @Hlavtox

�

31 of 32

Questions & Answers

​

32 of 32

Thank you!

​