-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
feat: frankenphp #58541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
CarlSchwan
wants to merge
6
commits into
master
Choose a base branch
from
carl/frankenphp
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,561
−1,360
Draft
feat: frankenphp #58541
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
cd5c190
feat: frankenphp
CarlSchwan 1d301dd
feat: enabled frankenphp worker mode
CarlSchwan 1ee9a07
fix: Change back base.php to have the same behavior as before
come-nc 4d08ffe
fix: cleanup some of the static vars
come-nc 90146ee
fix: Remove static var in NaturalSort
come-nc 5e337d2
feat: Add command in testing application to hunt for static properties
come-nc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,49 @@ | ||
| localhost { | ||
| php_server { | ||
| worker index.php | ||
| } | ||
|
|
||
| log { | ||
| level ERROR | ||
| output stderr | ||
| } | ||
|
|
||
| encode gzip | ||
|
|
||
| redir /.well-known/carddav /remote.php/dav 301 | ||
| redir /.well-known/caldav /remote.php/dav 301 | ||
|
|
||
| # Rule: Maps most RFC 8615 compliant well-known URIs to our main frontend controller (/index.php) by default | ||
| @wellKnown { | ||
| path "/.well-known/" | ||
| not { | ||
| path /.well-known/acme-challenge | ||
| path /.well-known/pki-validation | ||
| } | ||
| } | ||
| rewrite @wellKnown /index.php | ||
|
|
||
| rewrite /ocm-provider/ /index.php | ||
|
|
||
| @forbidden { | ||
| path /.htaccess | ||
| path /data/* | ||
| path /config/* | ||
| path /db_structure | ||
| path /.xml | ||
| path /README | ||
| path /3rdparty/* | ||
| path /lib/* | ||
| path /templates/* | ||
| path /occ | ||
| path /build | ||
| path /tests | ||
| path /console.php | ||
| path /autotest | ||
| path /issue | ||
| path /indi | ||
| path /db_ | ||
| path /console | ||
| } | ||
| respond @forbidden 404 | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,73 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| /** | ||
| * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors | ||
| * SPDX-License-Identifier: AGPL-3.0-or-later | ||
| */ | ||
|
|
||
| namespace OCA\Testing\Command; | ||
|
|
||
| use OCA\Theming\ImageManager; | ||
| use OCA\Theming\ThemingDefaults; | ||
| use OCP\IConfig; | ||
| use Symfony\Component\Console\Command\Command; | ||
| use Symfony\Component\Console\Input\InputArgument; | ||
| use Symfony\Component\Console\Input\InputInterface; | ||
| use Symfony\Component\Console\Input\InputOption; | ||
| use Symfony\Component\Console\Output\OutputInterface; | ||
|
|
||
| class StaticHunt extends Command { | ||
| public function __construct( | ||
| private IConfig $config, | ||
| ) { | ||
| parent::__construct(); | ||
| } | ||
|
|
||
| protected function configure() { | ||
| $this | ||
| ->setName('testing:static-hunt') | ||
| ->setDescription('Hunt for static properties in classes'); | ||
| } | ||
|
|
||
|
|
||
| protected function execute(InputInterface $input, OutputInterface $output): int { | ||
| //TODO run on all apps namespaces | ||
| $folders = [ | ||
| '\\OC' => __DIR__ . '/../../../../lib/private', | ||
| '' => __DIR__ . '/../../../../lib/private/legacy', | ||
| ]; | ||
| foreach ($folders as $namespace => $folder) { | ||
| $this->scanFolder($folder, $namespace, $output); | ||
| } | ||
|
|
||
| return 0; | ||
| } | ||
|
|
||
| private function scanFolder(string $folder, string $namespace, OutputInterface $output): void { | ||
| $folder = realpath($folder); | ||
| foreach (glob($folder.'/**.php') as $filename) { | ||
| try { | ||
| $filename = realpath($filename); | ||
| $classname = $namespace.substr(str_replace('/', '\\', substr($filename, strlen($folder))), 0, -4); | ||
| if (!class_exists($classname)) { | ||
| continue; | ||
| } | ||
| $rClass = new \ReflectionClass($classname); | ||
| $staticProperties = $rClass->getStaticProperties(); | ||
| if (empty($staticProperties)) { | ||
| continue; | ||
| } | ||
| $output->writeln('<info># ' . str_replace(\OC::$SERVERROOT, '', $filename) . " $classname</info>"); | ||
| foreach ($staticProperties as $property => $value) { | ||
| $propertyObject = $rClass->getProperty($property); | ||
| $output->write("$propertyObject"); | ||
| } | ||
| $output->writeln(""); | ||
| } catch (\Throwable $t) { | ||
| $output->writeln("$t"); | ||
| } | ||
| } | ||
| } | ||
| } |
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it!