67272[!!!][TASK] Use ".gz" instead of ".gzip" for compressed resources
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Markus Klein +1
- crell +1
- Mathias Bolt Lesniak +1
-
Verified V +2 Done
- Benni Mack +2
- Markus Klein +1
- Mathias Bolt Lesniak +1
- core-ci +1 CI
Issues 1
Files 6
- typo3/sysext/core/Classes/Resource/ResourceCompressor.php+9 −7
- typo3/sysext/core/Configuration/DefaultConfigurationDescription.yaml+1 −1
- typo3/sysext/core/Documentation/Changelog/12.0/Breaking-93182-ChangedFileExtensionForGzipCompressedFiles.rst4new+42 −0
- typo3/sysext/core/Tests/Unit/Resource/ResourceCompressorTest.php+2 −2
- typo3/sysext/install/Resources/Private/FolderStructureTemplateFiles/root-htaccess2+6 −6
- typo3/sysext/install/Resources/Private/FolderStructureTemplateFiles/root-web-config+1 −1
Review log 5882
Show 3957 earlier messages
-
Mathias Bolt Lesniak uploaded patch set 1 12/29/20, 13:08
-
TYPO3com voted on patch set 1 V +1 12/29/20, 13:18 Completed build in 10m 06s on Tue, 29 Dec, 01:18 PM Test Summary: 32540 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8492
-
Mathias Brodala commented on patch set 1 12/29/20, 13:35
Feature-93182-ConfigurableCompressedFileExtension.rst:48This should be rephrased a bit to make it clear what .htaccess files are affected in particular. For example the web root .htaccess is not changed. -
Mathias Bolt Lesniak uploaded patch set 2 12/29/20, 16:10
-
TYPO3com voted on patch set 2 V +1 12/29/20, 16:23 Completed build in 12m 28s on Tue, 29 Dec, 04:23 PM Test Summary: 32540 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8493
-
Richard Haeser commented on patch set 2 12/30/20, 08:19
Feature-93182-ConfigurableCompressedFileExtension.rst:75Can we be a bit more clear about how to set that option? People not familiar with the code might ask how to set this `htaccessContent` option. -
Mathias Brodala commented on patch set 2 12/30/20, 08:26
Feature-93182-ConfigurableCompressedFileExtension.rst:75ReplyI agree that a specific example should be added here. For configuration in general we will later point people to https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/Logging/Writers/Index.html#filewriter which will then be updated accordingly. -
Mathias Bolt Lesniak uploaded patch set 3 01/01/21, 12:47
-
TYPO3com voted on patch set 3 V -1 01/01/21, 12:56 Completed build in 08m 42s on Fri, 1 Jan, 12:56 PM Test Summary: 7 of 32781 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8530
-
Mathias Bolt Lesniak uploaded patch set 4 01/02/21, 09:29
-
TYPO3com voted on patch set 4 V +1 01/02/21, 09:39 Completed build in 09m 28s on Sat, 2 Jan, 09:39 AM Test Summary: 32540 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8547
-
Richard Haeser commented on patch set 4 01/03/21, 07:33
FileWriter.php:116Can you explain this a bit more? You set the variable to false, execute the initialize method to check if the variable is set and open the file, but you also already open the file with the setLogFile method as well. Why did you more from the old way of "initializing"? All the setters are executed in the parent constructor isnt it? So I guess the htaccessContent option is set there as well. -
Mathias Bolt Lesniak commented on patch set 4 01/05/21, 08:34
Sorry, guys. Today, I discovered my messages were only drafts until I did something.FileWriter.php:116ReplyHi Richard! In patchset 3, I moved openLogFile() into the end of the constructor to initialize only after all the options have been set, but it made the tests fail. It turns out that the tests call the constructor (causing a first round of initialization), but then call the setLogFile() method explicitly (second initialization). Alternative solutions to the failing tests would be to rewrite the tests, disabling the constructor or supplying the logFile configuration to the constructor, calling setLogFile() implicitly, rather than explicitly. However, I settled with doing it this way, as have no guarantee that setLogFile() isn't accessed directly (like in the tests) in live code. I would be happy to implement one of the other alternatives, but the code would potentially introduce breaking changes.FileWriter.php:247ReplyThat was a much better solution. Thanks for that idea. I applied the changes now.Feature-93182-ConfigurableCompressedFileExtension.rst:48ReplyI have extended the documentation now.Feature-93182-ConfigurableCompressedFileExtension.rst:75ReplyHello gentlemen! I have pushed a third patchset that addresses the issues you point out in the documentation. It also fixes a bug in FileWriter where the openLogFile() method was called before the options had been set. -
Benni Mack commented on patch set 4 01/10/21, 21:16
Hey MBL, I'm curious: What other kind of compression are you thinking of? -
Mathias Bolt Lesniak commented on patch set 4 01/11/21, 07:29
Reply
Hi Benni! I'm not thinking of changing the type of compression, but the possibility to change the extension, e.g. to just ".gz". (Some good reasons for using ".gz", for example, is mentioned in https://forge.typo3.org/issues/75043.) However, since you mention it, I guess any later flexibility in compression type (Brotli?) will also benefit from the possibility to change the file extension too. -
Richard Haeser uploaded patch set 5 01/16/21, 20:12
-
Richard Haeser commented on patch set 5 CR -1 01/16/21, 20:13
On it. Will upload another patchset tomorrow morning -
TYPO3com voted on patch set 5 V +1 01/16/21, 20:23 Completed build in 10m 03s on Sat, 16 Jan, 08:22 PM Test Summary: 32579 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8886
-
Richard Haeser uploaded patch set 6 01/17/21, 06:53
-
Richard Haeser uploaded patch set 7 01/17/21, 06:58
-
Richard Haeser uploaded patch set 8 01/17/21, 06:58
-
Richard Haeser voted on patch set 8 V +1 CR +1 01/17/21, 06:59
-
TYPO3com voted on patch set 6 V +1 01/17/21, 07:03 Completed build in 09m 41s on Sun, 17 Jan, 07:03 AM Test Summary: 32579 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8887
-
Richard Haeser commented on patch set 8 01/17/21, 07:06
FileWriter.php:116ReplyI uploaded a new patchset (ok several) which does exactly what you want as far as I can see but with way less code. I think you ended up in doing the initializing after some changes, but I think this way is way easier. -
TYPO3com voted on patch set 7 V +1 01/17/21, 07:07 Completed build in 09m 01s on Sun, 17 Jan, 07:07 AM Test Summary: 32579 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8888
-
TYPO3com voted on patch set 8 V -1 01/17/21, 07:12 Completed build in 10m 21s on Sun, 17 Jan, 07:12 AM Test Summary: 1 of 32820 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8889
-
TYPO3com voted on patch set 8 V +1 01/17/21, 07:22 Completed build in 09m 48s on Sun, 17 Jan, 07:22 AM Test Summary: 32579 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8890
-
Mathias Bolt Lesniak commented on patch set 8 01/17/21, 14:14
FileWriter.php:116ReplyThanks for looking at this. I think your version is pretty similar to Patchset 2. It has the benefit of a lot less code, but it won't work in real life. Let's say we initialize the FileWriter like this: `new FileWriter(['logFile' => 'foo', 'htaccessContent' => 'bar');` Given the order of the configuration items, AbstractWriter->__construct() will call setLogFile('foo') before it calls setHtaccessContent('bar'). It will also lead to createHtaccessFile() being called _before_ setHtaccessContent('bar'). This is because setLogFile() calls openLogFile() calls createLogFile() calls createHtaccessFile(). createHtaccessFile() is only called if there is no .htaccess file already, so it's only called once for each logFile location. This means createHtaccessFile() is called _before_ setHtaccessContent('bar'), which makes no sense. This means we have to prevent openLogFile() from happening until AbstractWriter->__construct() is finished calling all the setters, or setting htaccessContent won't have any effect. -
Richard Haeser uploaded patch set 9 01/21/21, 10:58
-
Richard Haeser commented on patch set 8 01/21/21, 10:58
FileWriter.php:116ReplyAh that is a good one indeed. Didn't think about that. Reverting my changes. -
TYPO3com voted on patch set 9 V -1 01/21/21, 11:13 Completed build in 14m 35s on Thu, 21 Jan, 11:13 AM Test Summary: 21910 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8957
-
TYPO3com voted on patch set 9 V +1 01/21/21, 20:57 Completed build in 09m 33s on Thu, 21 Jan, 08:57 PM Test Summary: 32601 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8973
-
Richard Haeser voted on patch set 9 V +1 CR +1 01/21/21, 20:57
-
Benni Mack uploaded patch set 10 06/21/21, 14:14
-
core-ci voted on patch set 10 V +1 06/21/21, 14:29 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12636
-
Benni Mack rebased onto patch set 11 09/01/21, 09:47
-
core-ci voted on patch set 11 V +1 09/01/21, 10:13 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16001
-
Nikita Hovratov commented on patch set 11 09/03/21, 16:24
It works fine! One suggestion: Already generated htaccess files can only be removed manually. They are ignored in admin tool cleanup tool. Should we check if the contents of the htaccess file would change and override it if so? -
Benni Mack commented on patch set 11 09/03/21, 20:59
Reply
I think so too, maybe we can add this as a follow up, as Feature Freeze is drawing near? -
Benni Mack commented on patch set 11 09/03/21, 21:01
DefaultConfiguration.php:267should we really ship this string around on every request? Maybe we can change this and rename also "`generateApacheHtaccess`" to only have one `htaccessTemplate = "EXT:core/Resources/Private/htacces.template" ? -
Mathias Bolt Lesniak commented on patch set 11 09/06/21, 07:13
Reply
Yeah. Let's wait with that. It would also require a test for "is this a file we have written or was it created by a third party".DefaultConfiguration.php:267ReplySounds like a good idea. That would make this into a breaking change, unless we check whether compressorApacheHtaccessTemplate is a file path first. -
Benni Mack wrote 11/29/21, 10:09
Change destination moved from master to main -
Benni Mack updated the commit message in patch set 12 11/29/21, 13:26
-
core-ci voted on patch set 12 V +1 11/29/21, 14:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20028
-
Benni Mack uploaded patch set 13 12/10/21, 10:44
-
core-ci voted on patch set 13 V +1 12/10/21, 10:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20923
-
Benni Mack wrote 12/10/21, 11:44
Removed cc Benni Mack. -
Mathias Bolt Lesniak uploaded patch set 14 12/31/21, 13:04
-
Mathias Bolt Lesniak commented on patch set 14 12/31/21, 13:06
DefaultConfiguration.php:267ReplyI implemented the file-based approach in patch set 14. -
core-ci voted on patch set 14 V +1 12/31/21, 13:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21532
-
Benni Mack commented on patch set 14 01/26/22, 09:59
Should we actually keep "gzip" at all? Or just go with "gz" as this is the most common usage (in apache + nginx out of the box)? -
Mathias Bolt Lesniak commented on patch set 14 01/26/22, 10:04
Reply
I would love that. -
Benni Mack uploaded patch set 15 05/04/22, 08:14
-
core-ci voted on patch set 15 V +1 05/04/22, 08:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26796
-
Benni Mack uploaded patch set 16 05/04/22, 08:49
-
Benni Mack commented on patch set 16 05/04/22, 08:57
Reply
Done -
core-ci voted on patch set 16 V +1 05/04/22, 09:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26800
-
Benni Mack commented on patch set 16 05/04/22, 09:03
Reply
Can you check if the patch works for you? -
crell commented on patch set 16 05/17/22, 17:25
Would it make sense to move the 'gz' magic string to a constant that can be referenced? I don't know that we'd ever change it in the future again, but it seems like a natural thing to do while making this kind of change. -
Georg Ringer commented on patch set 16 05/17/22, 18:56
Breaking-93182-ChangedFileExtensionForGzipCompressedFiles.rst:15css stands already (cascading) style sheets ;) -
Benni Mack uploaded patch set 17 06/10/22, 06:38
-
Benni Mack uploaded patch set 18 06/10/22, 06:41
-
core-ci voted on patch set 18 V +1 06/10/22, 06:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27907
-
core-ci voted on patch set 17 V +1 06/10/22, 06:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27906
-
Mathias Bolt Lesniak voted on patch set 18 V +1 CR +1 06/10/22, 06:52
-
Benni Mack commented on patch set 19 06/14/22, 06:57
Published edit on patch set 18. -
Benni Mack commented on patch set 19 06/14/22, 06:57
Reply
DoneReply
moved it to a class member.Breaking-93182-ChangedFileExtensionForGzipCompressedFiles.rst:15ReplyDone -
core-ci voted on patch set 19 V -1 06/14/22, 07:05 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28034
-
Benni Mack rebased onto patch set 20 06/14/22, 09:32
-
core-ci voted on patch set 20 V -1 06/14/22, 09:41 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28070
-
core-ci voted on patch set 20 V +1 06/14/22, 09:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28070
-
crell voted on patch set 20 CR +1 06/14/22, 14:45
-
Markus Klein commented on patch set 20 06/14/22, 14:54
Breaking-93182-ChangedFileExtensionForGzipCompressedFiles.rst:20thanroot-htaccess:42should actually be AddEncoding x-gzip .gz according to https://httpd.apache.org/docs/2.4/mod/mod_mime.html#addencoding -
Markus Klein commented on patch set 21 06/14/22, 14:55
Published edit on patch set 20. -
Markus Klein commented on patch set 21 06/14/22, 14:55
Breaking-93182-ChangedFileExtensionForGzipCompressedFiles.rst:20ReplyDoneroot-htaccess:42ReplyDone -
core-ci voted on patch set 21 V +1 06/14/22, 15:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28075
-
Benni Mack commented on patch set 21 06/14/22, 15:25
Thanks, Markus! -
Markus Klein voted on patch set 21 V +1 CR +1 06/14/22, 20:51
-
Mathias Bolt Lesniak voted on patch set 21 V +1 CR +1 06/15/22, 07:16
-
crell voted on patch set 21 CR +1 06/15/22, 13:58
-
Benni Mack voted on patch set 21 V +2 CR +2 06/17/22, 07:20
-
Benni Mack merged patch set 22 06/17/22, 07:20
FileWriter.php:247