{"id":15051424,"url":"https://github.com/nextcloud-libraries/rector","last_synced_at":"2025-10-16T04:01:57.727Z","repository":{"id":256451889,"uuid":"855341906","full_name":"nextcloud-libraries/rector","owner":"nextcloud-libraries","description":"Rector upgrade rules for Nextcloud","archived":false,"fork":false,"pushed_at":"2025-10-01T10:09:16.000Z","size":217,"stargazers_count":3,"open_issues_count":8,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-10-02T23:42:17.065Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nextcloud-libraries.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"COPYING","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":null},"created_at":"2024-09-10T17:56:59.000Z","updated_at":"2025-09-01T21:47:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"a327a4ed-ff5d-451e-88eb-b11d25e9cf73","html_url":"https://github.com/nextcloud-libraries/rector","commit_stats":null,"previous_names":["christophwurst/nextcloud-rector","nextcloud-libraries/rector"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/nextcloud-libraries/rector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextcloud-libraries%2Frector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextcloud-libraries%2Frector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextcloud-libraries%2Frector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextcloud-libraries%2Frector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nextcloud-libraries","download_url":"https://codeload.github.com/nextcloud-libraries/rector/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextcloud-libraries%2Frector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278527836,"owners_count":26001630,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T21:35:09.052Z","updated_at":"2025-10-16T04:01:57.674Z","avatar_url":"https://github.com/nextcloud-libraries.png","language":"PHP","readme":"# nextcloud/rector\n\nRector upgrade rules for Nextcloud\n\n## About\n\nThis is a package containing rector rules and sets to use to upgrade your Nextcloud application to the latest API changes.\n\nThis project adheres to a [code of conduct](CODE_OF_CONDUCT.md).\nBy participating in this project and its community, you are expected to uphold this code.\n\n\n## Installation\n\nInstall this package as a dependency using [Composer](https://getcomposer.org). We recommend to do so in a vendor bin directory along with rector.\n\n``` bash\ncomposer require --dev bamarni/composer-bin-plugin\ncomposer bin rector require rector/rector --dev\ncomposer bin rector require nextcloud/rector --dev\n```\n\n## Usage\n\nFirst generate a rector.php configuration by running `process` command a first time:\n```bash\n./vendor/bin/rector process\n```\n\nWe recommend that you first run rector with an empty configuration, commit the result, and then add the sets from Nextcloud\n and PHP one by one and commit the rule along with its result each time.\nYou should stop at the oldest version your application is supporting of both Nextcloud and PHP.\nDo not apply a newer set or you might lose compatibility.\nEach Nextcloud set includes the older ones so you only need one of them in your configuration.\nYou could end up with a configuration like this one:\n\n``` php\n\u003c?php\n\ndeclare(strict_types=1);\n\n/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-only\n */\n\nuse Nextcloud\\Rector\\Set\\NextcloudSets;\nuse Rector\\Config\\RectorConfig;\n\nreturn RectorConfig::configure()\n\t-\u003ewithPaths([\n\t\t__DIR__ . '/appinfo',\n\t\t__DIR__ . '/lib',\n\t\t__DIR__ . '/tests',\n\t])\n\t-\u003ewithPhpSets(php81: true)\n\t-\u003ewithTypeCoverageLevel(0)\n\t-\u003ewithSets([\n\t\tNextcloudSets::NEXTCLOUD_30,\n\t]);\n```\n\nMake sure that you also have nextcloud/coding-standard setup and to run the code style fixer after rector to fix styling.\n\n\n## Contributing\n\nContributions are welcome! To contribute, please familiarize yourself with\n[CONTRIBUTING.md](CONTRIBUTING.md).\n\n## Copyright and License\n\nnextcloud/rector is copyright © [Christoph Wurst](https://wuc.me)\nand licensed for use under the terms of the\nGNU Affero General Public License (AGPL-3.0-or-later) as published by the Free\nSoftware Foundation. Please see [COPYING](COPYING) and [NOTICE](NOTICE) for more\ninformation.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnextcloud-libraries%2Frector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnextcloud-libraries%2Frector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnextcloud-libraries%2Frector/lists"}