Skip to content

Commit

Permalink
Merge branch 'FakerPHP:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
notaprodev authored Feb 26, 2022
2 parents 16835cd + 42d0ba6 commit 8aa016c
Show file tree
Hide file tree
Showing 45 changed files with 972 additions and 395 deletions.
26 changes: 24 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,30 @@
# CHANGELOG

## [Unreleased](https://github.com/FakerPHP/Faker/compare/v1.17.0..main)

## [Unreleased](https://github.com/FakerPHP/Faker/compare/v1.19.0...main)

## [2022-02-02, v1.19.0](https://github.com/FakerPHP/Faker/compare/v1.18.0..v1.19.0)

- Added color extension to core (#442)
- Added conflict with `doctrine/persistence` below version `1.4`
- Fix for support on different Doctrine ORM versions (#414)
- Fix usage of `Doctrine\Persistence` dependency
- Fix CZ Person birthNumber docblock return type (#437)
- Fix is_IS Person docbock types (#439)
- Fix is_IS Address docbock type (#438)
- Fix regexify escape backslash in character class (#434)
- Removed UUID from Generator to be able to extend it (#441)
-
## [2022-01-23, v1.18.0](https://github.com/FakerPHP/Faker/compare/v1.17.0..v1.18.0)

- Deprecated UUID, use uuid3 to specify version (#427)
- Reset formatters when adding a new provider (#366)
- Helper methods to use our custom generators (#155)
- Set allow-plugins for Composer 2.2 (#405)
- Fix kk_KZ\Person::individualIdentificationNumber generation (#411)
- Allow for -> syntax to be used in parsing (#423)
- Person->name was missing string return type (#424)
- Generate a valid BE TAX number (#415)
- Added the UUID extension to Core (#427)

## [2021-12-05, v1.17.0](https://github.com/FakerPHP/Faker/compare/v1.16.0..v1.17.0)

Expand Down
9 changes: 6 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"require-dev": {
"ext-intl": "*",
"bamarni/composer-bin-plugin": "^1.4.1",
"doctrine/persistence": "^1.3 || ^2.0",
"symfony/phpunit-bridge": "^4.4 || ^5.2"
},
"autoload": {
Expand All @@ -41,17 +42,19 @@
"ext-curl": "Required by Faker\\Provider\\Image to download images.",
"ext-dom": "Required by Faker\\Provider\\HtmlLorem for generating random HTML.",
"ext-iconv": "Required by Faker\\Provider\\ru_RU\\Text::realText() for generating real Russian text.",
"ext-mbstring": "Required for multibyte Unicode string functionality."
"ext-mbstring": "Required for multibyte Unicode string functionality.",
"doctrine/orm": "Required to use Faker\\ORM\\Doctrine"
},
"config": {
"allow-plugins": {
"bamarni/composer-bin-plugin": true
"bamarni/composer-bin-plugin": true,
"composer/package-versions-deprecated": true
},
"sort-packages": true
},
"extra": {
"branch-alias": {
"dev-main": "v1.17-dev"
"dev-main": "v1.19-dev"
}
}
}
215 changes: 32 additions & 183 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,21 @@ parameters:
count: 1
path: src/Faker/Extension/ContainerBuilder.php

-
message: "#^Method Faker\\\\Generator\\:\\:optional\\(\\) should return Faker\\\\Generator but returns Faker\\\\ChanceGenerator\\.$#"
count: 1
path: src/Faker/Generator.php

-
message: "#^Method Faker\\\\Generator\\:\\:unique\\(\\) should return Faker\\\\Generator but returns Faker\\\\UniqueGenerator\\.$#"
count: 1
path: src/Faker/Generator.php

-
message: "#^Method Faker\\\\Generator\\:\\:valid\\(\\) should return Faker\\\\Generator but returns Faker\\\\ValidGenerator\\.$#"
count: 1
path: src/Faker/Generator.php

-
message: "#^Unreachable statement \\- code above always terminates\\.$#"
count: 1
Expand Down Expand Up @@ -51,19 +66,19 @@ parameters:
path: src/Faker/ORM/CakePHP/Populator.php

-
message: "#^Access to property \\$fieldMappings on an unknown class Doctrine\\\\Common\\\\Persistence\\\\Mapping\\\\ClassMetadata\\.$#"
message: "#^Access to an undefined property Doctrine\\\\Persistence\\\\Mapping\\\\ClassMetadata\\:\\:\\$fieldMappings\\.$#"
count: 2
path: src/Faker/ORM/Doctrine/ColumnTypeGuesser.php

-
message: "#^Call to method getTypeOfField\\(\\) on an unknown class Doctrine\\\\Common\\\\Persistence\\\\Mapping\\\\ClassMetadata\\.$#"
message: "#^Access to an undefined property Doctrine\\\\Persistence\\\\Mapping\\\\ClassMetadata\\:\\:\\$fieldMappings\\.$#"
count: 1
path: src/Faker/ORM/Doctrine/ColumnTypeGuesser.php
path: src/Faker/ORM/Doctrine/EntityPopulator.php

-
message: "#^Parameter \\$class of method Faker\\\\ORM\\\\Doctrine\\\\ColumnTypeGuesser\\:\\:guessFormat\\(\\) has invalid typehint type Doctrine\\\\Common\\\\Persistence\\\\Mapping\\\\ClassMetadata\\.$#"
count: 1
path: src/Faker/ORM/Doctrine/ColumnTypeGuesser.php
message: "#^Access to an undefined property Doctrine\\\\Persistence\\\\Mapping\\\\ClassMetadata\\:\\:\\$reflFields\\.$#"
count: 2
path: src/Faker/ORM/Doctrine/EntityPopulator.php

-
message: "#^Access to constant ONE on an unknown class Doctrine\\\\ODM\\\\MongoDB\\\\Mapping\\\\ClassMetadata\\.$#"
Expand All @@ -80,33 +95,18 @@ parameters:
count: 1
path: src/Faker/ORM/Doctrine/EntityPopulator.php

-
message: "#^Access to property \\$associationMappings on an unknown class Doctrine\\\\Common\\\\Persistence\\\\Mapping\\\\ClassMetadata\\.$#"
count: 1
path: src/Faker/ORM/Doctrine/EntityPopulator.php

-
message: "#^Access to property \\$associationMappings on an unknown class Doctrine\\\\ODM\\\\MongoDB\\\\Mapping\\\\ClassMetadata\\.$#"
count: 1
path: src/Faker/ORM/Doctrine/EntityPopulator.php

-
message: "#^Access to property \\$fieldMappings on an unknown class Doctrine\\\\Common\\\\Persistence\\\\Mapping\\\\ClassMetadata\\.$#"
message: "#^Call to an undefined method Doctrine\\\\Persistence\\\\Mapping\\\\ClassMetadata\\:\\:newInstance\\(\\)\\.$#"
count: 1
path: src/Faker/ORM/Doctrine/EntityPopulator.php

-
message: "#^Access to property \\$reflFields on an unknown class Doctrine\\\\Common\\\\Persistence\\\\Mapping\\\\ClassMetadata\\.$#"
count: 2
path: src/Faker/ORM/Doctrine/EntityPopulator.php

-
message: "#^Call to method createQueryBuilder\\(\\) on an unknown class Doctrine\\\\Common\\\\Persistence\\\\ObjectRepository\\.$#"
count: 1
path: src/Faker/ORM/Doctrine/EntityPopulator.php

-
message: "#^Call to method getAssociationMappings\\(\\) on an unknown class Doctrine\\\\Common\\\\Persistence\\\\Mapping\\\\ClassMetadata\\.$#"
message: "#^Call to an undefined method Doctrine\\\\Persistence\\\\ObjectRepository\\<object\\>\\:\\:createQueryBuilder\\(\\)\\.$#"
count: 1
path: src/Faker/ORM/Doctrine/EntityPopulator.php

Expand All @@ -115,61 +115,6 @@ parameters:
count: 1
path: src/Faker/ORM/Doctrine/EntityPopulator.php

-
message: "#^Call to method getAssociationNames\\(\\) on an unknown class Doctrine\\\\Common\\\\Persistence\\\\Mapping\\\\ClassMetadata\\.$#"
count: 1
path: src/Faker/ORM/Doctrine/EntityPopulator.php

-
message: "#^Call to method getAssociationTargetClass\\(\\) on an unknown class Doctrine\\\\Common\\\\Persistence\\\\Mapping\\\\ClassMetadata\\.$#"
count: 1
path: src/Faker/ORM/Doctrine/EntityPopulator.php

-
message: "#^Call to method getFieldNames\\(\\) on an unknown class Doctrine\\\\Common\\\\Persistence\\\\Mapping\\\\ClassMetadata\\.$#"
count: 1
path: src/Faker/ORM/Doctrine/EntityPopulator.php

-
message: "#^Call to method getIdentifier\\(\\) on an unknown class Doctrine\\\\Common\\\\Persistence\\\\Mapping\\\\ClassMetadata\\.$#"
count: 1
path: src/Faker/ORM/Doctrine/EntityPopulator.php

-
message: "#^Call to method getName\\(\\) on an unknown class Doctrine\\\\Common\\\\Persistence\\\\Mapping\\\\ClassMetadata\\.$#"
count: 1
path: src/Faker/ORM/Doctrine/EntityPopulator.php

-
message: "#^Call to method getRepository\\(\\) on an unknown class Doctrine\\\\Common\\\\Persistence\\\\ObjectManager\\.$#"
count: 1
path: src/Faker/ORM/Doctrine/EntityPopulator.php

-
message: "#^Call to method hasField\\(\\) on an unknown class Doctrine\\\\Common\\\\Persistence\\\\Mapping\\\\ClassMetadata\\.$#"
count: 1
path: src/Faker/ORM/Doctrine/EntityPopulator.php

-
message: "#^Call to method isCollectionValuedAssociation\\(\\) on an unknown class Doctrine\\\\Common\\\\Persistence\\\\Mapping\\\\ClassMetadata\\.$#"
count: 1
path: src/Faker/ORM/Doctrine/EntityPopulator.php

-
message: "#^Call to method isIdentifier\\(\\) on an unknown class Doctrine\\\\Common\\\\Persistence\\\\Mapping\\\\ClassMetadata\\.$#"
count: 1
path: src/Faker/ORM/Doctrine/EntityPopulator.php

-
message: "#^Call to method newInstance\\(\\) on an unknown class Doctrine\\\\Common\\\\Persistence\\\\Mapping\\\\ClassMetadata\\.$#"
count: 1
path: src/Faker/ORM/Doctrine/EntityPopulator.php

-
message: "#^Call to method persist\\(\\) on an unknown class Doctrine\\\\Common\\\\Persistence\\\\ObjectManager\\.$#"
count: 1
path: src/Faker/ORM/Doctrine/EntityPopulator.php

-
message: "#^Class Doctrine\\\\ODM\\\\MongoDB\\\\Mapping\\\\ClassMetadata not found\\.$#"
count: 1
Expand All @@ -180,66 +125,6 @@ parameters:
count: 1
path: src/Faker/ORM/Doctrine/EntityPopulator.php

-
message: "#^Method Faker\\\\ORM\\\\Doctrine\\\\EntityPopulator\\:\\:generateId\\(\\) never returns null so it can be removed from the return typehint\\.$#"
count: 1
path: src/Faker/ORM/Doctrine/EntityPopulator.php

-
message: "#^PHPDoc tag @var for variable \\$repository contains unknown class Doctrine\\\\Common\\\\Persistence\\\\ObjectRepository\\.$#"
count: 1
path: src/Faker/ORM/Doctrine/EntityPopulator.php

-
message: "#^Parameter \\$class of method Faker\\\\ORM\\\\Doctrine\\\\EntityPopulator\\:\\:__construct\\(\\) has invalid typehint type Doctrine\\\\Common\\\\Persistence\\\\Mapping\\\\ClassMetadata\\.$#"
count: 1
path: src/Faker/ORM/Doctrine/EntityPopulator.php

-
message: "#^Parameter \\$manager of method Faker\\\\ORM\\\\Doctrine\\\\EntityPopulator\\:\\:execute\\(\\) has invalid typehint type Doctrine\\\\Common\\\\Persistence\\\\ObjectManager\\.$#"
count: 1
path: src/Faker/ORM/Doctrine/EntityPopulator.php

-
message: "#^Parameter \\$manager of method Faker\\\\ORM\\\\Doctrine\\\\EntityPopulator\\:\\:generateId\\(\\) has invalid typehint type Doctrine\\\\Common\\\\Persistence\\\\ObjectManager\\.$#"
count: 1
path: src/Faker/ORM/Doctrine/EntityPopulator.php

-
message: "#^Property Faker\\\\ORM\\\\Doctrine\\\\EntityPopulator\\:\\:\\$class has unknown class Doctrine\\\\Common\\\\Persistence\\\\Mapping\\\\ClassMetadata as its type\\.$#"
count: 1
path: src/Faker/ORM/Doctrine/EntityPopulator.php

-
message: "#^Call to method flush\\(\\) on an unknown class Doctrine\\\\Common\\\\Persistence\\\\ObjectManager\\.$#"
count: 2
path: src/Faker/ORM/Doctrine/Populator.php

-
message: "#^Call to method flush\\(\\) on an unknown class Faker\\\\ORM\\\\Doctrine\\\\EntityManager\\.$#"
count: 2
path: src/Faker/ORM/Doctrine/Populator.php

-
message: "#^Call to method getClassMetadata\\(\\) on an unknown class Doctrine\\\\Common\\\\Persistence\\\\ObjectManager\\.$#"
count: 1
path: src/Faker/ORM/Doctrine/Populator.php

-
message: "#^Parameter \\$entityManager of method Faker\\\\ORM\\\\Doctrine\\\\Populator\\:\\:execute\\(\\) has invalid typehint type Faker\\\\ORM\\\\Doctrine\\\\EntityManager\\.$#"
count: 1
path: src/Faker/ORM/Doctrine/Populator.php

-
message: "#^Parameter \\$manager of method Faker\\\\ORM\\\\Doctrine\\\\Populator\\:\\:__construct\\(\\) has invalid typehint type Doctrine\\\\Common\\\\Persistence\\\\ObjectManager\\.$#"
count: 1
path: src/Faker/ORM/Doctrine/Populator.php

-
message: "#^Property Faker\\\\ORM\\\\Doctrine\\\\Populator\\:\\:\\$manager has unknown class Doctrine\\\\Common\\\\Persistence\\\\ObjectManager as its type\\.$#"
count: 1
path: src/Faker/ORM/Doctrine/Populator.php

-
message: "#^Call to method create\\(\\) on an unknown class Mandango\\\\Mandango\\.$#"
count: 1
Expand Down Expand Up @@ -735,6 +620,15 @@ parameters:
count: 2
path: src/Faker/Provider/Base.php

-
message:
"""
#^Instantiation of deprecated class Faker\\\\DefaultGenerator\\:
Use ChanceGenerator instead$#
"""
count: 1
path: src/Faker/Provider/Base.php

-
message: "#^Negated boolean expression is always false\\.$#"
count: 1
Expand Down Expand Up @@ -805,16 +699,6 @@ parameters:
count: 2
path: src/Faker/Provider/cs_CZ/DateTime.php

-
message: "#^Method Faker\\\\Provider\\\\cs_CZ\\\\Person\\:\\:birthNumber\\(\\) should return Faker\\\\Provider\\\\cs_CZ\\\\czech but returns string\\.$#"
count: 1
path: src/Faker/Provider/cs_CZ/Person.php

-
message: "#^Return typehint of method Faker\\\\Provider\\\\cs_CZ\\\\Person\\:\\:birthNumber\\(\\) has invalid type Faker\\\\Provider\\\\cs_CZ\\\\czech\\.$#"
count: 1
path: src/Faker/Provider/cs_CZ/Person.php

-
message: "#^Static call to instance method Faker\\\\Provider\\\\cs_CZ\\\\Person\\:\\:birthNumber\\(\\)\\.$#"
count: 2
Expand Down Expand Up @@ -850,41 +734,11 @@ parameters:
count: 1
path: src/Faker/Provider/id_ID/Person.php

-
message: "#^Property Faker\\\\Provider\\\\is_IS\\\\Address\\:\\:\\$postcode has unknown class Faker\\\\Provider\\\\is_IS\\\\Icelandic as its type\\.$#"
count: 1
path: src/Faker/Provider/is_IS/Address.php

-
message: "#^Static property Faker\\\\Provider\\\\is_IS\\\\Address\\:\\:\\$postcode \\(Faker\\\\Provider\\\\is_IS\\\\Icelandic\\) does not accept default value of type array\\<int, string\\>\\.$#"
count: 1
path: src/Faker/Provider/is_IS/Address.php

-
message: "#^Binary operation \"\\*\" between string and string results in an error\\.$#"
count: 1
path: src/Faker/Provider/is_IS/Person.php

-
message: "#^Parameter \\#1 \\$array of static method Faker\\\\Provider\\\\Base\\:\\:randomElement\\(\\) expects array, string given\\.$#"
count: 1
path: src/Faker/Provider/is_IS/Person.php

-
message: "#^Static property Faker\\\\Provider\\\\is_IS\\\\Person\\:\\:\\$firstNameFemale \\(string\\) does not accept default value of type array\\<int, string\\>\\.$#"
count: 1
path: src/Faker/Provider/is_IS/Person.php

-
message: "#^Static property Faker\\\\Provider\\\\is_IS\\\\Person\\:\\:\\$firstNameMale \\(string\\) does not accept default value of type array\\<int, string\\>\\.$#"
count: 1
path: src/Faker/Provider/is_IS/Person.php

-
message: "#^Static property Faker\\\\Provider\\\\is_IS\\\\Person\\:\\:\\$middleName \\(string\\) does not accept default value of type array\\<int, string\\>\\.$#"
count: 1
path: src/Faker/Provider/is_IS/Person.php

-
message: "#^Call to an undefined static method static\\(Faker\\\\Provider\\\\ja_JP\\\\Text\\)\\:\\:split\\(\\)\\.$#"
count: 1
Expand All @@ -895,11 +749,6 @@ parameters:
count: 2
path: src/Faker/Provider/nl_NL/Company.php

-
message: "#^Method Faker\\\\Provider\\\\pl_PL\\\\Company\\:\\:regonLocal\\(\\) should return 14 but returns string\\.$#"
count: 1
path: src/Faker/Provider/pl_PL/Company.php

-
message: "#^Binary operation \"\\+\" between string and int\\<\\-80, 80\\> results in an error\\.$#"
count: 1
Expand Down
2 changes: 2 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ includes:

parameters:
level: 5
bootstrapFiles:
- src/Faker/ORM/Doctrine/backward-compatibility.php
paths:
- src
tmpDir: .build/phpstan/
Loading

0 comments on commit 8aa016c

Please sign in to comment.