generated from spatie/package-skeleton-php
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update package and PHP versions * Upgrade to v2 * Update README * Make rootcertificate nullable * Fix styling * Add more search options * Fix styling * Update README * Add PHPStan * Fix styling * Add upgrade docs --------- Co-authored-by: Baspa <[email protected]>
- Loading branch information
Showing
10 changed files
with
311 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: PHPStan | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "**.php" | ||
- "phpstan.neon.dist" | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
phpstan: | ||
name: phpstan | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "8.2" | ||
coverage: none | ||
|
||
- name: Install composer dependencies | ||
uses: ramsey/composer-install@v3 | ||
|
||
- name: Run PHPStan | ||
run: ./vendor/bin/phpstan analyse --error-format=github --debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,4 @@ phpunit.xml | |
psalm.xml | ||
vendor | ||
.php-cs-fixer.cache | ||
|
||
!docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# Upgrading from v1.x to v2.x | ||
|
||
## Changes in Search Results | ||
|
||
In the new version, the search results have been expanded to include more detailed information. The Company object now contains the following data: | ||
|
||
- KvK number | ||
- Establishment number | ||
- Tradename | ||
- Address(es) (including type, full address, street, house number, zip code, city, and country) | ||
- Website(s) | ||
|
||
## New Search Methods | ||
|
||
1. Search by KvK Number | ||
The new version introduces the ability to search by KvK number: | ||
|
||
```php | ||
$companies = $kvk->searchByKvkNumber('12345678'); | ||
``` | ||
|
||
2. Search by RSIN | ||
You can now search by RSIN (Rechtspersonen en Samenwerkingsverbanden Informatienummer): | ||
|
||
```php | ||
$companies = $kvk->searchByRSIN('12345678'); | ||
``` | ||
|
||
## Pagination Support | ||
|
||
The new version adds support for pagination in search results: | ||
|
||
```php | ||
$kvk->setPage(2); | ||
$kvk->setResultsPerPage(20); | ||
``` | ||
|
||
Alternatively, you can pass these parameters directly to the search method: | ||
|
||
```php | ||
$companies = $kvk->search('Vormkracht10', [ | ||
'pagina' => 1, | ||
'resultatenPerPagina' => 10 | ||
]); | ||
``` | ||
|
||
## Updating dependencies | ||
|
||
```bash | ||
{ | ||
"require": { | ||
"vormkracht10/kvk-api": "^2.0" | ||
} | ||
} | ||
``` | ||
|
||
Then run `composer update` to install the new version. | ||
|
||
## Breaking changes | ||
|
||
- The structure of the Company object has changed. Make sure to update any code that relies on the specific structure of the search results. | ||
- The method signatures for creating the client and performing searches have been updated. Review and update your code accordingly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
parameters: | ||
level: 8 | ||
paths: | ||
- src | ||
tmpDir: build/phpstan | ||
parallel: | ||
maximumNumberOfProcesses: 1 |
Oops, something went wrong.