Commit graph

70 commits

Author SHA1 Message Date
provokateurin
8713730419
feat(rector): Add strict config for new code
Signed-off-by: provokateurin <kate@provokateurin.de>
2026-01-27 09:04:02 +01:00
provokateurin
3d09e8d912
feat(psalm): Add strict config for new code
Signed-off-by: provokateurin <kate@provokateurin.de>
2026-01-27 09:02:21 +01:00
provokateurin
30fa7e5390
fix(composer): Set overwrite.cli.url in serve script
Signed-off-by: provokateurin <kate@provokateurin.de>
2026-01-26 10:43:11 +01:00
Joas Schilling
f5abf9296d
ci(lint): Use multi file argument in lint
Since PHP 8.3 the linting command "php -l" can consume multiple files at once.
This drastically speeds up the time necessary for the linting from ~3 minutes
to few seconds.
By also running the linting on multiple cores, the time can be dropped to < 1s

Signed-off-by: Joas Schilling <coding@schilljs.com>
2026-01-19 16:57:34 +01:00
Carl Schwan
11cf69d8ba
fix(psalm): Fix static analysis issues in apps/*/tests
There are still 1200 more to fix before we can enable static analysis
for the tests.

Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-01-16 12:00:51 +01:00
Ferdinand Thiessen
922c3e01c7
chore: diable composer timeout
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-12-15 15:46:11 +01:00
Ferdinand Thiessen
e3b34891b0
chore: migrate to PHPUnit 11
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-11-05 15:42:33 +01:00
Benjamin Gaussorgues
c9b055a0d0 feat(database): introduce Snowflake IDs generator
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2025-10-28 17:50:03 +01:00
Ferdinand Thiessen
8f74228147 chore: Nextcloud 32 is PHP 8.2+
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-10-27 21:56:04 +01:00
Côme Chilliet
1bbf12c465
feat(tests): Fail on PHPUnit warnings and risky tests, show deprecations
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-09-27 13:05:17 +02:00
Joas Schilling
e192357e56
ci: Always be colorful :)
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-06-06 14:36:35 +02:00
provokateurin
d21062c3f0
feat(openapi): Add composer command
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-03-24 16:10:46 +01:00
provokateurin
72571a19dd
build(psalm): Configure unstable namespace
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-11-12 11:46:13 +01:00
Maxence Lange
0f6ef857eb feat(core): setting NCU namespace
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2024-11-07 17:49:08 -01:00
Joas Schilling
570a9e208f
ci: Add psalm baseline for security and make CI fail on change
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-10-01 00:11:07 +02:00
Joas Schilling
95bafb4980
ci: Improve usability of running different psalm modes locally
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-09-30 23:57:15 +02:00
Côme Chilliet
98efa3bda8
chore(rector): Move rector.php into the build folder
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-23 11:58:27 +02:00
Côme Chilliet
f9f95cf66d
chore: Add rector script to composer.json
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-20 17:51:00 +02:00
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