Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,22 @@ Some 3rd party libraries that are necessary to run Nextcloud.
8. Commit all changes onto a new branch
9. You might need the following command for pushing if used as submodule: `git push [email protected]:nextcloud/3rdparty.git branchname`

### Updating polyfills

We make use of Symfony polyfills to allow us writing code already using methods from newer PHP version.
This allows cleaner code and once our minimum PHP version is bumped we have no duplicated code for those methods anymore.

To keep the list of polyfills up to date, we need to add new polyfills once a new PHP version was released,
for example with the release of PHP 8.4 we need to add its polyfills by running `composer require symfony/polyfill-php84`.

But we need to also remove unused polyfills to reduce any (minimal) overhead.
Thus once we increase our minimal PHP version we should remove the added polyfills from the list of dependencies.
Moreover also some dependencies require polyfills, to also reduce the list of added polyfills,
we add the unneeded onces to the `replace` section of the `composer.json`.

So all PHP polyfills for already supported versions should be added to that section.
But also polyfills for PHP modules that we require to be installed should be added, one example here is the `mbstring` module.

## Testing your PR with server

1. On https://github.com/nextcloud/server make a new branch `3rdparty/my-dependency`
Expand Down
14 changes: 12 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
},
"require": {
"php": "^8.1",
"ext-ctype": "*",
"ext-mbstring": "*",
"aws/aws-sdk-php": "^3.349",
"bantu/ini-get-wrapper": "v1.0.1",
"cweagans/composer-patches": "^1.7",
Expand Down Expand Up @@ -54,14 +56,22 @@
"symfony/event-dispatcher": "^6.4.8",
"symfony/http-foundation": "^6.4.14",
"symfony/mailer": "^6.4",
"symfony/polyfill-intl-grapheme": "^1.32.0",
"symfony/polyfill-intl-normalizer": "^1.31.0",
"symfony/polyfill-intl-normalizer": "^1.32.0",
"symfony/polyfill-php82": "^1.32.0",
"symfony/polyfill-php83": "^1.32.0",
"symfony/polyfill-php84": "^1.32.0",
"symfony/process": "^6.4.15",
"symfony/routing": "^6.4.12",
"symfony/translation": "^6.4.4",
"wapmorgan/mp3info": "^0.1.1",
"web-auth/webauthn-lib": "^4.9.1"
},
"replace": {
"symfony/polyfill-php80": "*",
"symfony/polyfill-php81": "*",
"symfony/polyfill-ctype": "*",
"symfony/polyfill-mbstring": "*"
},
"scripts": {
"lint": "find . -name \\*.php -print0 | xargs -0 -n1 php -l",
"pre-autoload-dump": "Aws\\Script\\Composer\\Composer::removeUnusedServices"
Expand Down
164 changes: 39 additions & 125 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading