Commit Graph

52 Commits

Author SHA1 Message Date
Richard Steinmetz 9ef70f0c4e feat: drop support for php 8.0
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2024-04-08 11:28:54 +02:00
Côme Chilliet 6981ceaf54 chore: Add extra options to silence composer warnings
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-02-05 11:15:15 +01:00
Ferdinand Thiessen b6df9b703a
fix: Let git ignore composer dev dependencies
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2023-12-06 16:37:46 +01:00
Christoph Wurst 0da4c14cdf
refactor: Unify running a dev server (for automated testing)
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-11-02 09:59:06 +01:00
Côme Chilliet 27995d1376
Add all required PHP extensions to the composer.json
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-10-24 09:17:25 +02:00
Christoph Wurst 0e64ec6550
chore: Install phpunit via vendor bin
This means we can all run the same version. And when switching to
stableX it can pull the corresponding version too. Also local dev envs
and CI run the same phpunit.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-10-02 11:33:14 +02:00
jld3103 ab738a5b81
psalm: Disable cache
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2023-07-03 11:26:30 +02:00
Joas Schilling 373147ac02
fix(CI): Temporary workaround - Run Psalm CI with 1 thread only so it finishes
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-06-01 23:47:21 +02:00
jld3103 a0e3b3b829
Use all available threads for running psalm from composer
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2023-03-31 08:39:46 +02:00
Christoph Wurst 04578bc7ed
chore(deps): Declare ext-openssl as required
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-02-20 14:48:06 +01:00
Côme Chilliet 9369b67df3
Drop PHP 7.4 support for master (26)
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-20 11:22:07 +01:00
Christoph Wurst 450136b7cf
Add a helper function that makes it easier to log from anywhere
Our DI is able to inject a logger implementation to any server and app
class if they want one. However, sometimes DI isn't applicable or hard
to add. In those cases we typically fell back to the *service locator*
pattern where we acquired a logger from the server via a global
variable.

There were some issues with that
* `\OC` is a private class, apps are not supposed to use it
* `\OC::$server` is a global variable, a well known anti-pattern
* `\OC::$server->get(...)` uses the service locator anti-pattern
* `\OC::$server->get(...)` may throw
* `\OC::$server->get(LoggerInterface::class)` is not scoped to an app

With this patch I'm proposing a new helper function ``\OCP\Log\logger``
that can be used to acquire a logger more easily. This function is meant
to be public API and therefore apps may use it and there is an optional
parameter to specifiy the app ID.
The function hides all the ugly details about the global variable and
the potentially thrown exceptions from the user. Therefore it's
guaranteed that you always get a logger instance. In the worst case you
get a noop, though those occasions should be rare.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-05-23 09:53:38 +02:00
John Molakvoæ 1f92440b79
Fix mexitek/phpcolors
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-26 07:58:57 +02:00
Joas Schilling b3cf312edc
Start theming providers
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-04-21 09:29:33 +02:00
Côme Chilliet d635d58d19
Merge pull request #29286 from nextcloud/enhancement/drop-php-7-3
Drop PHP7.3
2022-02-01 10:50:28 +01:00
Carl Schwan f778cbe7b9
Fix registerEventListener issues
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-27 11:12:45 +01:00
Christoph Wurst 4259391162
Drop PHP7.3
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-01-25 17:25:08 +01:00
Carl Schwan aeecb72e96
Fix a few psalm issues and moved back to psalm/phar 4.18
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-12 20:03:06 +01:00
Julius Härtl b6a26007aa Allow using composer plugin with composer 2.2
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-12-30 11:28:33 +00:00
Christoph Wurst 88490ea630
Bump Symfony family and friends to v4.4.30
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-10-21 10:00:48 +02:00
Christoph Wurst e3541da93e
Scope composer tools with the bin plugin
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-08-19 12:25:55 +02:00
Daniel Kesselberg 2b60587a2f
Add mbstring as dependency
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2021-06-01 15:43:08 +02:00
Christoph Wurst ab3424ad44
Add ext-zip as platform dependency
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-05-03 10:10:28 +02:00
dependabot-preview[bot] eb502c02ff
Bump nextcloud/coding-standard from 0.3.0 to 0.5.0
Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 0.3.0 to 0.5.0.
- [Release notes](https://github.com/nextcloud/coding-standard/releases)
- [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-02-18 13:31:24 +01:00
Christoph Wurst ef26c1aedd
Require ext-simplexml via composer
This makes phpunit (and static analysis?) happy

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-11-26 15:16:16 +01:00
Christoph Wurst 0af22a64cb
Require xmlreader via composer
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-11-20 11:29:50 +01:00
Christoph Wurst 6ae2fe941f
Require libxml in composer
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-11-20 11:08:37 +01:00
dependabot-preview[bot] a2faa8c430
Bump vimeo/psalm from 3.17.2 to 4.0.1
Bumps [vimeo/psalm](https://github.com/vimeo/psalm) from 3.17.2 to 4.0.1.
- [Release notes](https://github.com/vimeo/psalm/releases)
- [Commits](https://github.com/vimeo/psalm/compare/3.17.2...4.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-20 20:48:43 +00:00
Christoph Wurst 2c40d2cf45
Bump vimeo/psalm from 3.15 to 3.17.1
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-14 11:47:54 +02:00
Christoph Wurst 081e9ac47f
Use own psalm instead of a global one
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-13 17:55:37 +02:00
Morris Jobke 04a3580d19
Remove phan config - was replaced by Psalm
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-09-16 14:46:29 +02:00
Daniel Kesselberg 6ba55d78dc
Add psalm as composer dependency
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-08-18 08:58:19 +02:00
Daniel Kesselberg e6dc1b2dcf
Remove unused jakub-onderka/php-parallel-lint
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-06-26 00:29:57 +02:00
Christoph Wurst adf7d17cb2
List ext-pdo as hard requirement for composer
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-05-28 20:43:50 +02:00
Morris Jobke 8614abaa5b
Respect exit code of lint run - changed from -exec to xargs as this exits properly
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-05-13 12:52:52 +02:00
Christoph Wurst 002780d4c3
Declare ext-json as dependency in composer.json
This makes phpstorm happy as it knows that the functions like
json_encode are available.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-05-13 09:50:36 +02:00
Christoph Wurst 0b652d543b
Print diff in cs:check command
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-15 14:36:14 +02:00
Christoph Wurst eea282ccc0
Bump coding standard lib for PSR2
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 17:01:08 +02:00
Christoph Wurst 2fbad1ed72
Fix (array) indent style to always use one tab
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 10:16:08 +02:00
Christoph Wurst 1e086064f5
Move legacy classes from PSR0 to PSR4
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-07 08:48:00 +02:00
Christoph Wurst 3eac89d448
Add shared php-cs config
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-31 13:45:10 +02:00
Roeland Jago Douma 64665c98e1
Lint on github actions
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-02-10 09:32:45 +01:00
Christoph Wurst de6940352a Move settings to an app
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
2019-09-28 09:39:28 +00:00
Roeland Jago Douma db555dde00
Add the legacy classes to the composer classmap
To have a faster autoloading. We should get rid of those of course. But
for now I do not see it happening any time soon.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-05-30 13:23:27 +02:00
Roeland Jago Douma 14be81c5b0
Use classmap to load core files
We can't use an authoritive classmap in the current state as it would
kill app loading. However we can use a proper classmap for the normal
core stuff.
2016-07-18 14:46:54 +02:00
Lukas Reschke 433c0160b6 Move OC\Core and OC\Settings to composer autoloader 2016-04-05 16:47:38 +02:00
Roeland Jago Douma f838d24c5d Allos OCP classes to be PSR-4 as well
This adds the OCP namespace to the composer autoloader as well.
This means that now we can use proper PSR-4 filenames in OCP.
2016-03-22 16:31:18 +01:00
Lukas Reschke dc364222d9 Execute PHP Parallel Linter on Travis 2016-03-16 12:17:58 +01:00
Roeland Jago Douma f7729cdc40 Add composers default autoloader to core
This introduces the defacto standard PSR-4 autoloader from composer into
core. This will allow proper PSR-4 naming of our classes.

Since our original autoloader is still available we can slowly switch
over classes to PSR-4.
2016-03-09 16:53:27 +01:00
Bart Visscher c1c76539cc Include copy of Symfony routing component, and don't use composer 2012-10-27 16:24:24 +02:00