Côme Chilliet
9369b67df3
Drop PHP 7.4 support for master (26)
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
před 1 rokem
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>
před 3 roky
John Molakvoæ
1f92440b79
Fix mexitek/phpcolors
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
před 2 roky
Joas Schilling
b3cf312edc
Start theming providers
Signed-off-by: Joas Schilling <coding@schilljs.com>
před 2 roky
Carl Schwan
f778cbe7b9
Fix registerEventListener issues
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
před 2 roky
Christoph Wurst
4259391162
Drop PHP7.3
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
před 2 roky
Carl Schwan
aeecb72e96
Fix a few psalm issues and moved back to psalm/phar 4.18
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
před 2 roky
Julius Härtl
b6a26007aa
Allow using composer plugin with composer 2.2
Signed-off-by: Julius Härtl <jus@bitgrid.net>
před 2 roky
Christoph Wurst
88490ea630
Bump Symfony family and friends to v4.4.30
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
před 2 roky
Christoph Wurst
e3541da93e
Scope composer tools with the bin plugin
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
před 2 roky
Daniel Kesselberg
2b60587a2f
Add mbstring as dependency
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
před 3 roky
Christoph Wurst
ab3424ad44
Add ext-zip as platform dependency
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
před 3 roky
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>
před 3 roky
Christoph Wurst
ef26c1aedd
Require ext-simplexml via composer
This makes phpunit (and static analysis?) happy
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
před 3 roky
Christoph Wurst
0af22a64cb
Require xmlreader via composer
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
před 3 roky
Christoph Wurst
6ae2fe941f
Require libxml in composer
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
před 3 roky
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>
před 3 roky
Christoph Wurst
2c40d2cf45
Bump vimeo/psalm from 3.15 to 3.17.1
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
před 3 roky
Christoph Wurst
081e9ac47f
Use own psalm instead of a global one
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
před 3 roky
Morris Jobke
04a3580d19
Remove phan config - was replaced by Psalm
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
před 3 roky
Daniel Kesselberg
6ba55d78dc
Add psalm as composer dependency
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
před 4 roky
Daniel Kesselberg
e6dc1b2dcf
Remove unused jakub-onderka/php-parallel-lint
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
před 4 roky
Christoph Wurst
adf7d17cb2
List ext-pdo as hard requirement for composer
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
před 4 roky
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>
před 4 roky
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>
před 4 roky
Christoph Wurst
0b652d543b
Print diff in cs:check command
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
před 4 roky
Christoph Wurst
eea282ccc0
Bump coding standard lib for PSR2
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
před 4 roky
Christoph Wurst
2fbad1ed72
Fix (array) indent style to always use one tab
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
před 4 roky
Christoph Wurst
1e086064f5
Move legacy classes from PSR0 to PSR4
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
před 4 roky
Christoph Wurst
3eac89d448
Add shared php-cs config
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
před 4 roky
Roeland Jago Douma
64665c98e1
Lint on github actions
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
před 4 roky
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>
před 4 roky
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>
před 5 roky
Lukas Reschke
4d1d82e2d7
Install phan manually
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
před 7 roky
Lukas Reschke
d8ec399454
Run phan over code base
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
před 7 roky
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.
před 8 roky
Lukas Reschke
433c0160b6
Move OC\Core and OC\Settings to composer autoloader
před 8 roky
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.
před 8 roky
Lukas Reschke
dc364222d9
Execute PHP Parallel Linter on Travis
před 8 roky
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.
před 8 roky
Bart Visscher
2dc1b778b4
Include copy of Symfony routing component, and don't use composer
před 11 roky
Bart Visscher
c1c76539cc
Include copy of Symfony routing component, and don't use composer
před 11 roky
Bart Visscher
beaaf5425d
More info for composer.json
před 11 roky
Bart Visscher
43e8293d9c
Change Symfony/Component/Routing from submodule to composer fetching
před 11 roky