Skip to content

Commit 18ba6f2

Browse files
authored
Merge pull request #9086 from kenjis/update-contributing
docs: update contributing Pull Request
2 parents 9c99605 + f5a2654 commit 18ba6f2

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

contributing/internals.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ projects outside of CodeIgniter. Basically, this means that any
1313
dependencies should be kept to a minimum. Any dependencies must be able
1414
to be passed into the constructor. If you do need to use one of the
1515
other core packages, you can create that in the constructor using the
16-
`Services` class, as long as you provide a way for dependencies to
16+
`service()` function, as long as you provide a way for dependencies to
1717
override that:
1818

1919
```php
2020
public function __construct(?Foo $foo = null)
2121
{
22-
$this->foo = $foo ?? \Config\Services::foo();
22+
$this->foo = $foo ?? service('foo');
2323
}
2424
```
2525

26-
## Type declarations
26+
## Type Declarations
2727

2828
PHP7 provides [Type declarations](https://www.php.net/manual/en/language.types.declarations.php)
2929
for method parameters and return types. Use it where possible. Return type
@@ -112,10 +112,9 @@ should generally match the package name.
112112

113113
## Autoloader
114114

115-
All files within the package should be added to
116-
**system/Config/AutoloadConfig.php**, in the "classmap" property. This
117-
is only used for core framework files, and helps to minimize file system
118-
scans and keep performance high.
115+
All source files within the **system/ThirdParty** should be added to
116+
**system/Config/AutoloadConfig.php**, in the `$coreClassmap` property. This
117+
is only used for loading the third party packages without Composer.
119118

120119
## Command-Line Support
121120

contributing/pull_request.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ PHPStan is expected to scan the entire framework by running this command in your
260260
terminal:
261261

262262
```console
263-
vendor/bin/phpstan analyse
263+
composer phpstan:check
264264
```
265265

266266
See also:
@@ -272,7 +272,7 @@ false positive and should be ignored, the baseline can be updated with the follo
272272
command:
273273

274274
```console
275-
vendor/bin/phpstan analyze --generate-baseline phpstan-baseline.php
275+
composer phpstan:baseline
276276
```
277277

278278
#### Rector

0 commit comments

Comments
 (0)