77619[FEATURE] Provide a filter method for countries
Commit message
Review
-
Code review CR +2 Done
- Stefan Bürk +2
- Benni Mack +1
-
Verified V +2 Done
- Stefan Bürk +2
- Benni Mack +1
- core-ci +1 CI
Issues 2
Files 6
- typo3/sysext/core/Classes/Country/CountryFilter.php17new+68 −0
- typo3/sysext/core/Classes/Country/CountryProvider.php4+37 −1
- typo3/sysext/core/Documentation/Changelog/12.2/Feature-99618-ListOfCountriesInTheWorldAndTheirLocalizedNames.rst7+11 −1
- typo3/sysext/core/Tests/Unit/Country/CountryProviderTest.php+27 −0
- typo3/sysext/fluid/Classes/ViewHelpers/Form/CountrySelectViewHelper.php2+14 −20
- typo3/sysext/fluid/Classes/ViewHelpers/Form/SelectViewHelper.php+1 −1
Review log 2736
Show 711 earlier messages
-
Georg Ringer uploaded patch set 1 01/27/23, 08:04
-
core-ci voted on patch set 1 V -1 01/27/23, 08:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36672
-
Georg Ringer uploaded patch set 2
V -101/27/23, 08:23 -
core-ci voted on patch set 2 V -1 01/27/23, 08:36 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36674
-
Georg Ringer uploaded patch set 3
V -101/27/23, 08:41 -
core-ci voted on patch set 3 V -1 01/27/23, 08:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36676
-
Georg Ringer uploaded patch set 4
V -101/27/23, 09:58 -
core-ci voted on patch set 4 V +1 01/27/23, 10:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36679
-
Georg Ringer commented on patch set 4 01/27/23, 10:20
This change is ready for review. -
Oliver Klee commented on patch set 4 01/27/23, 10:41
Let's be more specific with the types.CountryFilter.php:30@return string[]CountryFilter.php:35@param string[] $excludeCountries @return $thisCountryFilter.php:41@return string[]CountryFilter.php:46@param string[] $onlyCountries @return $thisCountryProvider.php:1774array<string, Country> -
Georg Ringer uploaded patch set 5
V +102/01/23, 06:00
-
core-ci voted on patch set 5 V +1 02/01/23, 06:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36856
-
Josef Glatz commented on patch set 5 CR -1 02/01/23, 06:26
Feature-99618-ListOfCountriesInTheWorldAndTheirLocalizedNames.rst:73Newly added VH arguments of this patch are missing -
Georg Ringer uploaded patch set 6
CR -1V +102/01/23, 07:10 -
core-ci voted on patch set 6 V +1 02/01/23, 07:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36857
-
Georg Ringer commented on patch set 6 02/01/23, 08:34
CountryFilter.php:30ReplyDoneCountryFilter.php:35ReplyDoneCountryFilter.php:41ReplyDoneCountryFilter.php:46ReplyDoneCountryProvider.php:1774ReplyDoneFeature-99618-ListOfCountriesInTheWorldAndTheirLocalizedNames.rst:73ReplyDone -
Oliver Klee voted on patch set 6 CR +1 02/01/23, 09:15
-
Chris Müller commented on patch set 6 02/02/23, 12:25
CountrySelectViewHelper.php:58What means "size"? The length of the field in px? The number of items displayed (when multiple set)? The number of countries displayed? As this is also used in the documentation, it should be clarified here. -
Stefan Bürk commented on patch set 6 02/02/23, 12:30
Feature-99618-ListOfCountriesInTheWorldAndTheirLocalizedNames.rst:43I guess there a call is missing, something like ``` $filteredCountries = $countryProvider->getByFilter($filter); ``` -
Stefan Bürk commented on patch set 6 02/02/23, 12:38
CountryFilter.php:21Can we avoid the acronym here ? And eventually not calling it "DTO" at all ? ``` Simple object proving country list filter options ```CountryFilter.php:23Would go with final for this class. There is no need to extend this class.CountryFilter.php:26Can we add a constructor to the class, using CPP with privave readonly for the properties with empty array as defaults ? Personally I would favor more a immutable class design for this, but okay with the current if we add a constructor.Feature-99618-ListOfCountriesInTheWorldAndTheirLocalizedNames.rst:40There is no need to use GU::makeInstance here - the filter (option) class is a simple configuration object. simply new instantiating is enough. See class, should be final anyway, so also no need for "overriding" by container. Otherwise a proper "interface" should be implemented if really wanted. And with adding the stated constructor in the class thies could then be simpyfied provding the filters directly in the new call. -
Stefan Bürk commented on patch set 6 02/02/23, 12:40
CountryProvider.php:1776Not happy with this method name ... maybe just simplyfy by using `filter` or at least `getFiltered()` .. `getByFilter()` is a duplication by the given argument and sounds kind of duplicated here .. -
Stefan Bürk commented on patch set 6 02/02/23, 12:49
CountryFilter.php:26Replywithout `readonly` due the setter - or immutable design and "withX()" instead of setters ;) -
Georg Ringer uploaded patch set 7
CR +1V +102/02/23, 12:54 -
Georg Ringer commented on patch set 6 02/02/23, 12:54
CountryFilter.php:21ReplyDoneCountryFilter.php:23ReplyDoneCountryFilter.php:26ReplyAckCountryProvider.php:1776ReplyDoneFeature-99618-ListOfCountriesInTheWorldAndTheirLocalizedNames.rst:40ReplyDone -
core-ci voted on patch set 7 V -1 02/02/23, 13:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36922
-
Georg Ringer uploaded patch set 8
V -102/02/23, 13:14 -
core-ci voted on patch set 8 V +1 02/02/23, 13:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36925
-
Simon Schaufelberger commented on patch set 8 02/03/23, 01:06
CountryFilter.php:45shouldn't the return type be "self" instead? -
Oliver Klee commented on patch set 8 02/03/23, 10:28
CountryFilter.php:45ReplyNo: "$this" means "the instance on which the method was called" (i.e., a fluent interface), while "self" means "any instance of the same class of the object on which the method was called". So "$this" is a subset of "self". (PHPStan understands both.) -
Benni Mack uploaded patch set 9
V +102/03/23, 17:07 -
Benni Mack commented on patch set 8 02/03/23, 17:07
Feature-99618-ListOfCountriesInTheWorldAndTheirLocalizedNames.rst:43Replysee the line below 😄CountrySelectViewHelper.php:58Replyit's actually the same as in SelectViewHelper which I now also adapted. -
Benni Mack voted on patch set 9 CR +1 02/03/23, 17:08
-
core-ci voted on patch set 9 V +1 02/03/23, 17:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37003
-
Benni Mack voted on patch set 9 V +1 02/04/23, 21:01
-
Stefan Bürk commented on patch set 9 V +2 CR +2 02/04/23, 21:07
Feature-99618-ListOfCountriesInTheWorldAndTheirLocalizedNames.rst:43Reply😊 there it is - how could I missed that 😂 -
Stefan Bürk merged patch set 10 02/04/23, 21:07