@flarum/cli 2.0.0-beta.8 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +178 -48
- package/bin/run +2 -1
- package/bin/splitsh-lite-darwin +0 -0
- package/bin/splitsh-lite-linux +0 -0
- package/boilerplate/skeleton/extension/.gitattributes +16 -14
- package/boilerplate/skeleton/extension/.github/workflows/backend.yml +2 -6
- package/boilerplate/skeleton/extension/.github/workflows/frontend.yml +5 -6
- package/boilerplate/skeleton/extension/.github/workflows/phpstan.yml +12 -0
- package/boilerplate/skeleton/extension/LICENSE.md +1 -1
- package/boilerplate/skeleton/extension/README.md +1 -1
- package/boilerplate/skeleton/extension/composer.json +13 -7
- package/boilerplate/skeleton/extension/extend.php +2 -2
- package/boilerplate/skeleton/extension/gitignore +1 -0
- package/boilerplate/skeleton/extension/js/admin.ts +2 -0
- package/boilerplate/skeleton/extension/js/forum.ts +2 -0
- package/boilerplate/skeleton/extension/js/jest.config.cjs +1 -0
- package/boilerplate/skeleton/extension/js/package.json +11 -4
- package/boilerplate/skeleton/extension/js/src/admin/extend.js +8 -0
- package/boilerplate/skeleton/extension/js/src/admin/extend.ts +8 -0
- package/boilerplate/skeleton/extension/js/src/admin/index.js +2 -0
- package/boilerplate/skeleton/extension/js/src/admin/index.ts +7 -0
- package/boilerplate/skeleton/extension/js/src/common/extend.js +5 -0
- package/boilerplate/skeleton/extension/js/src/common/extend.ts +5 -0
- package/boilerplate/skeleton/extension/js/src/common/index.ts +5 -0
- package/boilerplate/skeleton/extension/js/src/forum/extend.js +8 -0
- package/boilerplate/skeleton/extension/js/src/forum/extend.ts +8 -0
- package/boilerplate/skeleton/extension/js/src/forum/index.js +2 -0
- package/boilerplate/skeleton/extension/js/src/forum/index.ts +7 -0
- package/boilerplate/skeleton/extension/js/tests/unit/.gitkeep +0 -0
- package/boilerplate/skeleton/extension/js/tsconfig.json +10 -2
- package/boilerplate/skeleton/extension/js/tsconfig.test.json +10 -0
- package/boilerplate/skeleton/extension/locale/en.yml +1 -1
- package/boilerplate/skeleton/extension/phpstan.neon +12 -0
- package/boilerplate/skeleton/extension/tests/phpunit.integration.xml +6 -7
- package/boilerplate/skeleton/extension/tests/phpunit.unit.xml +5 -10
- package/boilerplate/stubs/backend/advanced-api-resource.php +85 -0
- package/boilerplate/stubs/backend/api-resource.php +73 -0
- package/boilerplate/stubs/backend/command.php +2 -2
- package/boilerplate/stubs/backend/controller.php +19 -0
- package/boilerplate/stubs/backend/event-listener.php +1 -1
- package/boilerplate/stubs/backend/filter.php +25 -0
- package/boilerplate/stubs/backend/handler/command.php +6 -20
- package/boilerplate/stubs/backend/handler/handler.php +6 -14
- package/boilerplate/stubs/backend/integration-test.php +10 -7
- package/boilerplate/stubs/backend/job.php +6 -11
- package/boilerplate/stubs/backend/mail-driver.php +36 -0
- package/boilerplate/stubs/backend/middleware.php +19 -0
- package/boilerplate/stubs/backend/model.php +1 -1
- package/boilerplate/stubs/backend/notification-blueprint.php +42 -0
- package/boilerplate/stubs/backend/notification-driver.php +32 -0
- package/boilerplate/stubs/backend/policy.php +1 -1
- package/boilerplate/stubs/backend/post-type.php +35 -0
- package/boilerplate/stubs/backend/repository.php +2 -10
- package/boilerplate/stubs/backend/search/driver.php +13 -0
- package/boilerplate/stubs/backend/search/searcher.php +41 -0
- package/boilerplate/stubs/backend/service-provider.php +1 -1
- package/boilerplate/stubs/backend/validator.php +1 -1
- package/boilerplate/stubs/frontend/component.js +1 -1
- package/boilerplate/stubs/frontend/forum-page.js +68 -0
- package/boilerplate/stubs/frontend/gambit/boolean.js +12 -0
- package/boilerplate/stubs/frontend/gambit/key-value.js +16 -0
- package/boilerplate/stubs/frontend/modal.js +1 -1
- package/boilerplate/stubs/frontend/model.js +1 -1
- package/boilerplate/stubs/frontend/notification.js +22 -0
- package/boilerplate/stubs/frontend/post-type.js +13 -0
- package/boilerplate/stubs/migration.php +1 -1
- package/boilerplate/stubs/views/email/html/information.blade.php +8 -0
- package/boilerplate/stubs/views/email/html/notification.blade.php +8 -0
- package/boilerplate/stubs/views/email/plain/information.blade.php +7 -0
- package/boilerplate/stubs/views/email/plain/notification.blade.php +6 -0
- package/lib/base-command.d.ts +22 -6
- package/lib/base-command.js +114 -56
- package/lib/boilersmith/io.d.ts +33 -11
- package/lib/boilersmith/io.js +32 -17
- package/lib/boilersmith/paths.d.ts +3 -3
- package/lib/boilersmith/paths.js +7 -7
- package/lib/boilersmith/scaffolding/audit-step-factory.js +12 -12
- package/lib/boilersmith/scaffolding/infra-step-factory.js +2 -2
- package/lib/boilersmith/scaffolding/init-step-factory.js +5 -5
- package/lib/boilersmith/scaffolding/module.d.ts +30 -10
- package/lib/boilersmith/scaffolding/module.js +61 -19
- package/lib/boilersmith/scaffolding/scaffolder.d.ts +4 -1
- package/lib/boilersmith/scaffolding/scaffolder.js +33 -33
- package/lib/boilersmith/scaffolding/template-param.d.ts +2 -2
- package/lib/boilersmith/scaffolding/template-param.js +2 -2
- package/lib/boilersmith/step-manager.d.ts +15 -11
- package/lib/boilersmith/step-manager.js +45 -29
- package/lib/boilersmith/steps/stub-base.js +4 -4
- package/lib/boilersmith/utils/clone-and-fill.js +1 -1
- package/lib/boilersmith/utils/commit-async.d.ts +2 -0
- package/lib/boilersmith/utils/commit-async.js +15 -0
- package/lib/boilersmith/utils/json-leaf-paths.d.ts +2 -2
- package/lib/boilersmith/utils/read-tpl.js +2 -2
- package/lib/commands/audit/infra.d.ts +2 -5
- package/lib/commands/audit/infra.js +31 -9
- package/lib/commands/infra.d.ts +2 -10
- package/lib/commands/infra.js +20 -14
- package/lib/commands/init.d.ts +2 -5
- package/lib/commands/init.js +7 -5
- package/lib/commands/make/backend/{api-serializer.d.ts → api-resource.d.ts} +2 -5
- package/lib/commands/make/backend/api-resource.js +26 -0
- package/lib/commands/make/backend/command.d.ts +1 -4
- package/lib/commands/make/backend/command.js +3 -4
- package/lib/commands/make/backend/{api-controller.d.ts → controller.d.ts} +2 -5
- package/lib/commands/make/backend/controller.js +31 -0
- package/lib/commands/make/backend/event-listener.d.ts +1 -4
- package/lib/commands/make/backend/event-listener.js +2 -3
- package/lib/commands/make/backend/{api-serializer-attributes.d.ts → filter.d.ts} +3 -6
- package/lib/commands/make/backend/filter.js +26 -0
- package/lib/commands/make/backend/handler.d.ts +2 -5
- package/lib/commands/make/backend/handler.js +8 -11
- package/lib/commands/make/backend/integration-test.d.ts +1 -4
- package/lib/commands/make/backend/integration-test.js +4 -6
- package/lib/commands/make/backend/job.d.ts +1 -4
- package/lib/commands/make/backend/job.js +2 -2
- package/lib/commands/make/backend/mail-driver.d.ts +12 -0
- package/lib/commands/make/backend/mail-driver.js +29 -0
- package/lib/commands/make/backend/middleware.d.ts +11 -0
- package/lib/commands/make/backend/middleware.js +26 -0
- package/lib/commands/make/backend/migration.d.ts +1 -4
- package/lib/commands/make/backend/migration.js +10 -4
- package/lib/commands/make/backend/model.d.ts +6 -7
- package/lib/commands/make/backend/model.js +69 -449
- package/lib/commands/make/backend/notification-blueprint.d.ts +12 -0
- package/lib/commands/make/backend/notification-blueprint.js +29 -0
- package/lib/commands/make/backend/notification-driver.d.ts +12 -0
- package/lib/commands/make/backend/notification-driver.js +29 -0
- package/lib/commands/make/backend/policy.d.ts +1 -4
- package/lib/commands/make/backend/policy.js +2 -3
- package/lib/commands/make/backend/post-type.d.ts +12 -0
- package/lib/commands/make/backend/post-type.js +29 -0
- package/lib/commands/make/backend/repository.d.ts +1 -4
- package/lib/commands/make/backend/repository.js +1 -1
- package/lib/commands/make/backend/route.d.ts +1 -4
- package/lib/commands/make/backend/route.js +2 -3
- package/lib/commands/make/backend/search-driver.d.ts +11 -0
- package/lib/commands/make/backend/search-driver.js +51 -0
- package/lib/commands/make/backend/service-provider.d.ts +1 -4
- package/lib/commands/make/backend/service-provider.js +3 -4
- package/lib/commands/make/backend/validator.d.ts +1 -4
- package/lib/commands/make/backend/validator.js +2 -2
- package/lib/commands/make/frontend/component.d.ts +4 -5
- package/lib/commands/make/frontend/component.js +7 -2
- package/lib/commands/make/frontend/forum-page.d.ts +11 -0
- package/lib/commands/make/frontend/forum-page.js +92 -0
- package/lib/commands/make/frontend/gambit.d.ts +11 -0
- package/lib/commands/make/frontend/gambit.js +30 -0
- package/lib/commands/make/frontend/modal.d.ts +1 -4
- package/lib/commands/make/frontend/modal.js +3 -2
- package/lib/commands/make/frontend/model.d.ts +6 -7
- package/lib/commands/make/frontend/model.js +27 -28
- package/lib/commands/make/frontend/notification.d.ts +12 -0
- package/lib/commands/make/frontend/notification.js +62 -0
- package/lib/commands/make/frontend/post-type.d.ts +12 -0
- package/lib/commands/make/frontend/post-type.js +59 -0
- package/lib/commands/make/locale.d.ts +11 -0
- package/lib/commands/make/locale.js +27 -0
- package/lib/commands/make/model.d.ts +12 -0
- package/lib/commands/make/model.js +29 -0
- package/lib/commands/make/notification.d.ts +11 -0
- package/lib/commands/make/notification.js +33 -0
- package/lib/commands/make/post-type.d.ts +11 -0
- package/lib/commands/make/post-type.js +31 -0
- package/lib/commands/monorepo/create.d.ts +12 -0
- package/lib/commands/monorepo/create.js +20 -0
- package/lib/commands/monorepo/split.d.ts +12 -0
- package/lib/commands/monorepo/split.js +19 -0
- package/lib/commands/update/js-imports.d.ts +1 -4
- package/lib/commands/update/js-imports.js +2 -3
- package/lib/commands/upgrade/2.0.d.ts +17 -0
- package/lib/commands/upgrade/2.0.js +113 -0
- package/lib/help.js +2 -2
- package/lib/providers/php-provider.d.ts +7 -1
- package/lib/providers/php-provider.js +18 -5
- package/lib/steps/extenders/{api-serializer.d.ts → api-resource.d.ts} +1 -1
- package/lib/steps/extenders/api-resource.js +38 -0
- package/lib/steps/extenders/base.d.ts +1 -1
- package/lib/steps/extenders/base.js +13 -1
- package/lib/steps/extenders/console-command.js +1 -1
- package/lib/steps/extenders/event.js +1 -1
- package/lib/steps/extenders/mail-driver.d.ts +5 -0
- package/lib/steps/extenders/mail-driver.js +58 -0
- package/lib/steps/extenders/middleware.d.ts +5 -0
- package/lib/steps/extenders/middleware.js +57 -0
- package/lib/steps/extenders/notification-driver.d.ts +5 -0
- package/lib/steps/extenders/notification-driver.js +58 -0
- package/lib/steps/extenders/notification-type.d.ts +5 -0
- package/lib/steps/extenders/notification-type.js +55 -0
- package/lib/steps/extenders/policy.js +1 -1
- package/lib/steps/extenders/post-type.d.ts +5 -0
- package/lib/steps/extenders/post-type.js +42 -0
- package/lib/steps/extenders/route.js +11 -2
- package/lib/steps/extenders/search-driver.d.ts +5 -0
- package/lib/steps/extenders/search-driver.js +38 -0
- package/lib/steps/extenders/search-filter.d.ts +5 -0
- package/lib/steps/extenders/search-filter.js +67 -0
- package/lib/steps/extenders/service-provider.js +1 -1
- package/lib/steps/gen-ext-scaffolder.d.ts +4 -4
- package/lib/steps/gen-ext-scaffolder.js +264 -58
- package/lib/steps/js/base.d.ts +14 -5
- package/lib/steps/js/base.js +101 -27
- package/lib/steps/js/model.d.ts +4 -7
- package/lib/steps/js/model.js +45 -19
- package/lib/steps/js/notification.d.ts +7 -0
- package/lib/steps/js/notification.js +58 -0
- package/lib/steps/js/post-type.d.ts +8 -0
- package/lib/steps/js/post-type.js +60 -0
- package/lib/steps/js/routes.d.ts +7 -0
- package/lib/steps/js/routes.js +63 -0
- package/lib/steps/js/search-driver-locale.d.ts +8 -0
- package/lib/steps/js/search-driver-locale.js +36 -0
- package/lib/steps/js/search-gambit.d.ts +7 -0
- package/lib/steps/js/search-gambit.js +51 -0
- package/lib/steps/locale/base.d.ts +32 -0
- package/lib/steps/locale/base.js +97 -0
- package/lib/steps/misc/composer.js +2 -2
- package/lib/steps/misc/git.d.ts +1 -1
- package/lib/steps/misc/git.js +3 -3
- package/lib/steps/misc/npm.d.ts +11 -0
- package/lib/steps/misc/npm.js +19 -0
- package/lib/steps/misc/yarn.js +2 -2
- package/lib/steps/monorepo/create.d.ts +19 -0
- package/lib/steps/monorepo/create.js +187 -0
- package/lib/steps/monorepo/split.d.ts +14 -0
- package/lib/steps/monorepo/split.js +99 -0
- package/lib/steps/stubs/backend/advanced-api-resource.d.ts +13 -0
- package/lib/steps/stubs/backend/advanced-api-resource.js +81 -0
- package/lib/steps/stubs/backend/{api-serializer.d.ts → api-resource.d.ts} +2 -2
- package/lib/steps/stubs/backend/{api-serializer.js → api-resource.js} +12 -9
- package/lib/steps/stubs/backend/command.d.ts +2 -21
- package/lib/steps/stubs/backend/command.js +15 -1
- package/lib/steps/stubs/backend/{api-controller.d.ts → controller.d.ts} +4 -14
- package/lib/steps/stubs/backend/controller.js +40 -0
- package/lib/steps/stubs/backend/event-listener.d.ts +1 -1
- package/lib/steps/stubs/backend/event-listener.js +3 -1
- package/lib/steps/stubs/backend/filter.d.ts +8 -0
- package/lib/steps/stubs/backend/filter.js +44 -0
- package/lib/steps/stubs/backend/handler-command.d.ts +2 -27
- package/lib/steps/stubs/backend/handler-command.js +3 -1
- package/lib/steps/stubs/backend/handler.d.ts +1 -1
- package/lib/steps/stubs/backend/handler.js +5 -1
- package/lib/steps/stubs/backend/integration-test.d.ts +1 -1
- package/lib/steps/stubs/backend/integration-test.js +1 -4
- package/lib/steps/stubs/backend/job.d.ts +1 -1
- package/lib/steps/stubs/backend/job.js +1 -0
- package/lib/steps/stubs/backend/mail-driver.d.ts +7 -0
- package/lib/steps/stubs/backend/mail-driver.js +30 -0
- package/lib/steps/stubs/backend/middleware.d.ts +22 -0
- package/lib/steps/stubs/backend/middleware.js +31 -0
- package/lib/steps/stubs/backend/migration.js +6 -3
- package/lib/steps/stubs/backend/model.d.ts +2 -24
- package/lib/steps/stubs/backend/model.js +3 -5
- package/lib/steps/stubs/backend/notification-blueprint.d.ts +7 -0
- package/lib/steps/stubs/backend/notification-blueprint.js +44 -0
- package/lib/steps/stubs/backend/notification-driver.d.ts +7 -0
- package/lib/steps/stubs/backend/notification-driver.js +30 -0
- package/lib/steps/stubs/backend/policy.d.ts +1 -1
- package/lib/steps/stubs/backend/policy.js +3 -1
- package/lib/steps/stubs/backend/post-type.d.ts +7 -0
- package/lib/steps/stubs/backend/post-type.js +44 -0
- package/lib/steps/stubs/backend/repository.d.ts +1 -1
- package/lib/steps/stubs/backend/repository.js +3 -1
- package/lib/steps/stubs/backend/search-driver-searcher.d.ts +24 -0
- package/lib/steps/stubs/backend/search-driver-searcher.js +32 -0
- package/lib/steps/stubs/backend/search-driver.d.ts +8 -0
- package/lib/steps/stubs/backend/search-driver.js +49 -0
- package/lib/steps/stubs/backend/service-provider.d.ts +1 -1
- package/lib/steps/stubs/backend/service-provider.js +1 -0
- package/lib/steps/stubs/backend/validator.d.ts +1 -1
- package/lib/steps/stubs/backend/validator.js +1 -0
- package/lib/steps/stubs/flarum-base.js +1 -1
- package/lib/steps/stubs/frontend/component.d.ts +0 -5
- package/lib/steps/stubs/frontend/component.js +1 -0
- package/lib/steps/stubs/frontend/forum-page.d.ts +25 -0
- package/lib/steps/stubs/frontend/forum-page.js +37 -0
- package/lib/steps/stubs/frontend/gambit.d.ts +7 -0
- package/lib/steps/stubs/frontend/gambit.js +50 -0
- package/lib/steps/stubs/frontend/modal.d.ts +0 -5
- package/lib/steps/stubs/frontend/modal.js +1 -0
- package/lib/steps/stubs/frontend/model.d.ts +8 -1
- package/lib/steps/stubs/frontend/model.js +6 -0
- package/lib/steps/stubs/frontend/notification.d.ts +11 -0
- package/lib/steps/stubs/frontend/notification.js +48 -0
- package/lib/steps/stubs/frontend/post-type.d.ts +11 -0
- package/lib/steps/stubs/frontend/post-type.js +48 -0
- package/lib/steps/stubs/js-base.js +12 -5
- package/lib/steps/stubs/php-base.js +13 -9
- package/lib/steps/update/js-imports.js +9 -3
- package/lib/steps/upgrade/twopointoh/backend/email-views.d.ts +18 -0
- package/lib/steps/upgrade/twopointoh/backend/email-views.js +81 -0
- package/lib/steps/upgrade/twopointoh/backend/filesystem.d.ts +8 -0
- package/lib/steps/upgrade/twopointoh/backend/filesystem.js +40 -0
- package/lib/steps/upgrade/twopointoh/backend/intervention-image.d.ts +8 -0
- package/lib/steps/upgrade/twopointoh/backend/intervention-image.js +44 -0
- package/lib/steps/upgrade/twopointoh/backend/json-api.d.ts +12 -0
- package/lib/steps/upgrade/twopointoh/backend/json-api.js +111 -0
- package/lib/steps/upgrade/twopointoh/backend/mailer.d.ts +8 -0
- package/lib/steps/upgrade/twopointoh/backend/mailer.js +37 -0
- package/lib/steps/upgrade/twopointoh/backend/misc.d.ts +8 -0
- package/lib/steps/upgrade/twopointoh/backend/misc.js +42 -0
- package/lib/steps/upgrade/twopointoh/backend/phpunit.d.ts +8 -0
- package/lib/steps/upgrade/twopointoh/backend/phpunit.js +52 -0
- package/lib/steps/upgrade/twopointoh/backend/search.d.ts +28 -0
- package/lib/steps/upgrade/twopointoh/backend/search.js +200 -0
- package/lib/steps/upgrade/twopointoh/base.d.ts +58 -0
- package/lib/steps/upgrade/twopointoh/base.js +284 -0
- package/lib/steps/upgrade/twopointoh/dependencies.d.ts +10 -0
- package/lib/steps/upgrade/twopointoh/dependencies.js +108 -0
- package/lib/steps/upgrade/twopointoh/frontend/code-splitting/usage-of-lazy-modules.d.ts +26 -0
- package/lib/steps/upgrade/twopointoh/frontend/code-splitting/usage-of-lazy-modules.js +418 -0
- package/lib/steps/upgrade/twopointoh/frontend/export-registry/compat.d.ts +12 -0
- package/lib/steps/upgrade/twopointoh/frontend/export-registry/compat.js +75 -0
- package/lib/steps/upgrade/twopointoh/frontend/export-registry/import-ext.d.ts +13 -0
- package/lib/steps/upgrade/twopointoh/frontend/export-registry/import-ext.js +126 -0
- package/lib/steps/upgrade/twopointoh/frontend/format.d.ts +8 -0
- package/lib/steps/upgrade/twopointoh/frontend/format.js +32 -0
- package/lib/steps/upgrade/twopointoh/frontend/misc.d.ts +17 -0
- package/lib/steps/upgrade/twopointoh/frontend/misc.js +433 -0
- package/lib/steps/upgrade/twopointoh/infra.d.ts +10 -0
- package/lib/steps/upgrade/twopointoh/infra.js +51 -0
- package/lib/steps/upgrade/twopointoh/less.d.ts +12 -0
- package/lib/steps/upgrade/twopointoh/less.js +217 -0
- package/lib/utils/add-extenders.d.ts +2 -0
- package/lib/utils/add-extenders.js +115 -0
- package/lib/utils/ast.d.ts +22 -0
- package/lib/utils/ast.js +235 -0
- package/lib/utils/composer.d.ts +2 -1
- package/lib/utils/migration.js +3 -1
- package/lib/utils/model-name.d.ts +1 -0
- package/lib/utils/model-name.js +7 -3
- package/lib/utils/monorepo.d.ts +24 -0
- package/lib/utils/monorepo.js +24 -0
- package/lib/utils/validation.d.ts +6 -1
- package/lib/utils/validation.js +15 -0
- package/oclif.manifest.json +1 -1
- package/package.json +27 -14
- package/php-subsystem/composer.json +11 -9
- package/php-subsystem/composer.lock +66 -71
- package/php-subsystem/index.php +41 -6
- package/php-subsystem/src/CustomPrettyPrinter.php +1 -1
- package/php-subsystem/src/ExtenderUtil.php +7 -13
- package/php-subsystem/src/NodeUtil.php +72 -0
- package/php-subsystem/src/NodeVisitors/AddExtender.php +28 -12
- package/php-subsystem/src/NodeVisitors/AddUses.php +24 -0
- package/php-subsystem/src/NodeVisitors/ChangeSignatures.php +200 -0
- package/php-subsystem/src/NodeVisitors/ReplaceUses.php +175 -0
- package/php-subsystem/src/Upgrade/Replacement.php +51 -0
- package/php-subsystem/src/Upgrade/ReplacementResult.php +17 -0
- package/php-subsystem/src/Upgrade/TwoPointOh/EmailViews.php +94 -0
- package/php-subsystem/src/Upgrade/TwoPointOh/Filesystem.php +88 -0
- package/php-subsystem/src/Upgrade/TwoPointOh/InterventionImage.php +86 -0
- package/php-subsystem/src/Upgrade/TwoPointOh/JsonApi.php +186 -0
- package/php-subsystem/src/Upgrade/TwoPointOh/Misc.php +564 -0
- package/php-subsystem/src/Upgrade/TwoPointOh/PhpUnit.php +241 -0
- package/php-subsystem/src/Upgrade/TwoPointOh/Search.php +589 -0
- package/php-subsystem/vendor/autoload.php +18 -0
- package/php-subsystem/vendor/bin/php-parse +119 -0
- package/php-subsystem/vendor/composer/ClassLoader.php +166 -32
- package/php-subsystem/vendor/composer/InstalledVersions.php +350 -209
- package/php-subsystem/vendor/composer/autoload_classmap.php +1 -1
- package/php-subsystem/vendor/composer/autoload_namespaces.php +1 -1
- package/php-subsystem/vendor/composer/autoload_psr4.php +1 -1
- package/php-subsystem/vendor/composer/autoload_real.php +3 -22
- package/php-subsystem/vendor/composer/installed.json +56 -61
- package/php-subsystem/vendor/composer/installed.php +29 -30
- package/php-subsystem/vendor/composer/platform_check.php +2 -2
- package/php-subsystem/vendor/nikic/php-parser/README.md +21 -13
- package/php-subsystem/vendor/nikic/php-parser/bin/php-parse +12 -11
- package/php-subsystem/vendor/nikic/php-parser/composer.json +41 -39
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php +58 -11
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php +54 -25
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php +11 -4
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php +87 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Enum_.php +116 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php +8 -9
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php +22 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php +26 -7
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php +31 -13
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php +5 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php +69 -26
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php +47 -18
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php +6 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php +25 -28
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php +31 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php +8 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php +85 -70
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php +119 -71
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php +1 -2
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Comment.php +35 -67
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php +3 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluator.php +17 -9
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Error.php +24 -33
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php +6 -9
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php +11 -7
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php +36 -22
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php +24 -14
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php +237 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php +63 -69
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php +15 -10
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php +74 -92
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php +11 -18
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php +10 -15
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php +45 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php +19 -25
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php +6 -10
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php +22 -29
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php +31 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php +31 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php +6 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php +10 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer.php +70 -491
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Modifiers.php +69 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NameContext.php +23 -24
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php +13 -14
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php +43 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php +9 -10
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php +5 -7
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php +36 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php +13 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php +12 -13
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php +37 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php +10 -11
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php +1 -39
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php +11 -11
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php +35 -30
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php +9 -10
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php +9 -10
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php +8 -11
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php +35 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php +5 -6
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php +5 -6
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php +12 -12
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php +34 -27
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php +1 -32
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php +5 -6
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php +10 -11
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php +15 -12
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php +13 -14
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php +11 -11
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php +12 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php +8 -7
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php +18 -13
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php +17 -12
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php +18 -13
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php +10 -10
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php +6 -7
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php +10 -10
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php +9 -9
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php +19 -14
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php +11 -11
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php +12 -13
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php +6 -7
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php +6 -7
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php +10 -11
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php +1 -2
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php +6 -9
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Identifier.php +13 -13
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php +32 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php +27 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php +8 -9
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php +8 -9
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php +8 -9
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php +80 -53
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php +10 -11
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php +47 -23
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php +37 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php +1 -68
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php +1 -29
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php +1 -28
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Float_.php +78 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php +82 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php +34 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php +1 -71
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php +44 -24
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php +1 -2
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/StaticVar.php +39 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Block.php +29 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php +8 -9
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php +10 -11
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php +11 -12
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php +33 -27
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php +15 -15
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php +66 -71
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php +48 -61
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php +8 -9
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php +1 -32
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php +12 -12
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php +9 -10
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php +9 -10
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php +11 -12
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php +17 -13
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php +19 -15
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php +20 -17
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php +31 -27
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php +16 -14
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php +18 -15
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php +13 -10
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php +11 -12
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php +35 -36
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php +1 -32
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php +8 -9
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php +1 -35
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php +8 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php +9 -10
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php +8 -9
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php +12 -13
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php +9 -10
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php +3 -4
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php +10 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php +11 -12
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php +1 -50
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php +16 -16
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php +9 -10
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php +1 -2
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php +8 -11
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/UseItem.php +55 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php +27 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node.php +24 -29
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php +20 -20
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php +169 -82
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php +28 -19
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php +71 -84
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php +4 -7
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php +1 -2
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php +82 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php +6 -7
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php +40 -24
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php +8 -11
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor.php +59 -7
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php +1 -2
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php +2011 -2058
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Parser/Php8.php +2717 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Parser.php +9 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php +466 -248
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php +31 -33
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/PhpVersion.php +164 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php +419 -338
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter.php +51 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php +587 -431
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Token.php +18 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/compatibility_tokens.php +63 -0
- package/boilerplate/stubs/backend/api-controller/create.php +0 -53
- package/boilerplate/stubs/backend/api-controller/delete.php +0 -52
- package/boilerplate/stubs/backend/api-controller/list.php +0 -61
- package/boilerplate/stubs/backend/api-controller/normal.php +0 -29
- package/boilerplate/stubs/backend/api-controller/show.php +0 -48
- package/boilerplate/stubs/backend/api-controller/update.php +0 -54
- package/boilerplate/stubs/backend/api-serializer.php +0 -36
- package/lib/commands/make/backend/api-controller.js +0 -27
- package/lib/commands/make/backend/api-serializer-attributes.js +0 -15
- package/lib/commands/make/backend/api-serializer.js +0 -15
- package/lib/steps/extenders/api-serializer.js +0 -77
- package/lib/steps/stubs/backend/api-controller.js +0 -62
- package/lib/steps/stubs/frontend/migration.js +0 -1
- package/php-subsystem/vendor/nikic/php-parser/.editorconfig +0 -9
- package/php-subsystem/vendor/nikic/php-parser/grammar/README.md +0 -30
- package/php-subsystem/vendor/nikic/php-parser/grammar/parser.template +0 -106
- package/php-subsystem/vendor/nikic/php-parser/grammar/php5.y +0 -1026
- package/php-subsystem/vendor/nikic/php-parser/grammar/php7.y +0 -1152
- package/php-subsystem/vendor/nikic/php-parser/grammar/phpyLang.php +0 -192
- package/php-subsystem/vendor/nikic/php-parser/grammar/rebuildParsers.php +0 -81
- package/php-subsystem/vendor/nikic/php-parser/grammar/tokens.template +0 -17
- package/php-subsystem/vendor/nikic/php-parser/grammar/tokens.y +0 -115
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php +0 -47
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php +0 -76
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php +0 -23
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php +0 -105
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php +0 -30
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Parser/Multiple.php +0 -55
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php +0 -2630
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php +0 -145
- /package/{lib/steps/stubs/frontend/migration.d.ts → boilerplate/skeleton/extension/js/tests/integration/.gitkeep} +0 -0
- /package/boilerplate/skeleton/extension/js/{webpack.config.js → webpack.config.cjs} +0 -0
|
@@ -1,65 +1,60 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
2
|
+
"packages": [
|
|
3
|
+
{
|
|
4
|
+
"name": "nikic/php-parser",
|
|
5
|
+
"version": "v5.0.2",
|
|
6
|
+
"version_normalized": "5.0.2.0",
|
|
7
|
+
"source": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/nikic/PHP-Parser.git",
|
|
10
|
+
"reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13"
|
|
11
|
+
},
|
|
12
|
+
"dist": {
|
|
13
|
+
"type": "zip",
|
|
14
|
+
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/139676794dc1e9231bf7bcd123cfc0c99182cb13",
|
|
15
|
+
"reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13",
|
|
16
|
+
"shasum": ""
|
|
17
|
+
},
|
|
18
|
+
"require": {
|
|
19
|
+
"ext-ctype": "*",
|
|
20
|
+
"ext-json": "*",
|
|
21
|
+
"ext-tokenizer": "*",
|
|
22
|
+
"php": ">=7.4"
|
|
23
|
+
},
|
|
24
|
+
"require-dev": {
|
|
25
|
+
"ircmaxell/php-yacc": "^0.0.7",
|
|
26
|
+
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
|
|
27
|
+
},
|
|
28
|
+
"time": "2024-03-05T20:51:40+00:00",
|
|
29
|
+
"bin": ["bin/php-parse"],
|
|
30
|
+
"type": "library",
|
|
31
|
+
"extra": {
|
|
32
|
+
"branch-alias": {
|
|
33
|
+
"dev-master": "5.0-dev"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"installation-source": "dist",
|
|
37
|
+
"autoload": {
|
|
38
|
+
"psr-4": {
|
|
39
|
+
"PhpParser\\": "lib/PhpParser"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"notification-url": "https://packagist.org/downloads/",
|
|
43
|
+
"license": ["BSD-3-Clause"],
|
|
44
|
+
"authors": [
|
|
3
45
|
{
|
|
4
|
-
|
|
5
|
-
"version": "v4.10.5",
|
|
6
|
-
"version_normalized": "4.10.5.0",
|
|
7
|
-
"source": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "https://github.com/nikic/PHP-Parser.git",
|
|
10
|
-
"reference": "4432ba399e47c66624bc73c8c0f811e5c109576f"
|
|
11
|
-
},
|
|
12
|
-
"dist": {
|
|
13
|
-
"type": "zip",
|
|
14
|
-
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4432ba399e47c66624bc73c8c0f811e5c109576f",
|
|
15
|
-
"reference": "4432ba399e47c66624bc73c8c0f811e5c109576f",
|
|
16
|
-
"shasum": ""
|
|
17
|
-
},
|
|
18
|
-
"require": {
|
|
19
|
-
"ext-tokenizer": "*",
|
|
20
|
-
"php": ">=7.0"
|
|
21
|
-
},
|
|
22
|
-
"require-dev": {
|
|
23
|
-
"ircmaxell/php-yacc": "^0.0.7",
|
|
24
|
-
"phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0"
|
|
25
|
-
},
|
|
26
|
-
"time": "2021-05-03T19:11:20+00:00",
|
|
27
|
-
"bin": [
|
|
28
|
-
"bin/php-parse"
|
|
29
|
-
],
|
|
30
|
-
"type": "library",
|
|
31
|
-
"extra": {
|
|
32
|
-
"branch-alias": {
|
|
33
|
-
"dev-master": "4.9-dev"
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
"installation-source": "dist",
|
|
37
|
-
"autoload": {
|
|
38
|
-
"psr-4": {
|
|
39
|
-
"PhpParser\\": "lib/PhpParser"
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
"notification-url": "https://packagist.org/downloads/",
|
|
43
|
-
"license": [
|
|
44
|
-
"BSD-3-Clause"
|
|
45
|
-
],
|
|
46
|
-
"authors": [
|
|
47
|
-
{
|
|
48
|
-
"name": "Nikita Popov"
|
|
49
|
-
}
|
|
50
|
-
],
|
|
51
|
-
"description": "A PHP parser written in PHP",
|
|
52
|
-
"keywords": [
|
|
53
|
-
"parser",
|
|
54
|
-
"php"
|
|
55
|
-
],
|
|
56
|
-
"support": {
|
|
57
|
-
"issues": "https://github.com/nikic/PHP-Parser/issues",
|
|
58
|
-
"source": "https://github.com/nikic/PHP-Parser/tree/v4.10.5"
|
|
59
|
-
},
|
|
60
|
-
"install-path": "../nikic/php-parser"
|
|
46
|
+
"name": "Nikita Popov"
|
|
61
47
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
48
|
+
],
|
|
49
|
+
"description": "A PHP parser written in PHP",
|
|
50
|
+
"keywords": ["parser", "php"],
|
|
51
|
+
"support": {
|
|
52
|
+
"issues": "https://github.com/nikic/PHP-Parser/issues",
|
|
53
|
+
"source": "https://github.com/nikic/PHP-Parser/tree/v5.0.2"
|
|
54
|
+
},
|
|
55
|
+
"install-path": "../nikic/php-parser"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"dev": true,
|
|
59
|
+
"dev-package-names": []
|
|
65
60
|
}
|
|
@@ -1,33 +1,32 @@
|
|
|
1
|
-
<?php return array
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
<?php return array(
|
|
2
|
+
'root' => array(
|
|
3
|
+
'name' => 'flarum/cli-php-util',
|
|
4
|
+
'pretty_version' => 'dev-main',
|
|
5
|
+
'version' => 'dev-main',
|
|
6
|
+
'reference' => '42418e7740cb916b86141e808b36b799d7b85f67',
|
|
7
|
+
'type' => 'library',
|
|
8
|
+
'install_path' => __DIR__ . '/../../',
|
|
9
|
+
'aliases' => array(),
|
|
10
|
+
'dev' => true,
|
|
8
11
|
),
|
|
9
|
-
'
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
'versions' => array(
|
|
13
|
+
'flarum/cli-php-util' => array(
|
|
14
|
+
'pretty_version' => 'dev-main',
|
|
15
|
+
'version' => 'dev-main',
|
|
16
|
+
'reference' => '42418e7740cb916b86141e808b36b799d7b85f67',
|
|
17
|
+
'type' => 'library',
|
|
18
|
+
'install_path' => __DIR__ . '/../../',
|
|
19
|
+
'aliases' => array(),
|
|
20
|
+
'dev_requirement' => false,
|
|
21
|
+
),
|
|
22
|
+
'nikic/php-parser' => array(
|
|
23
|
+
'pretty_version' => 'v5.0.2',
|
|
24
|
+
'version' => '5.0.2.0',
|
|
25
|
+
'reference' => '139676794dc1e9231bf7bcd123cfc0c99182cb13',
|
|
26
|
+
'type' => 'library',
|
|
27
|
+
'install_path' => __DIR__ . '/../nikic/php-parser',
|
|
28
|
+
'aliases' => array(),
|
|
29
|
+
'dev_requirement' => false,
|
|
30
|
+
),
|
|
22
31
|
),
|
|
23
|
-
'nikic/php-parser' =>
|
|
24
|
-
array (
|
|
25
|
-
'pretty_version' => 'v4.10.5',
|
|
26
|
-
'version' => '4.10.5.0',
|
|
27
|
-
'aliases' =>
|
|
28
|
-
array (
|
|
29
|
-
),
|
|
30
|
-
'reference' => '4432ba399e47c66624bc73c8c0f811e5c109576f',
|
|
31
|
-
),
|
|
32
|
-
),
|
|
33
32
|
);
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
$issues = array();
|
|
6
6
|
|
|
7
|
-
if (!(PHP_VERSION_ID >=
|
|
8
|
-
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.
|
|
7
|
+
if (!(PHP_VERSION_ID >= 70400)) {
|
|
8
|
+
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". You are running ' . PHP_VERSION . '.';
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
if ($issues) {
|
|
@@ -3,24 +3,24 @@ PHP Parser
|
|
|
3
3
|
|
|
4
4
|
[](https://coveralls.io/github/nikic/PHP-Parser?branch=master)
|
|
5
5
|
|
|
6
|
-
This is a PHP
|
|
6
|
+
This is a PHP parser written in PHP. Its purpose is to simplify static code analysis and
|
|
7
7
|
manipulation.
|
|
8
8
|
|
|
9
|
-
[**Documentation for version
|
|
9
|
+
[**Documentation for version 5.x**][doc_master] (current; for running on PHP >= 7.4; for parsing PHP 7.0 to PHP 8.3, with limited support for parsing PHP 5.x).
|
|
10
10
|
|
|
11
|
-
[Documentation for version
|
|
11
|
+
[Documentation for version 4.x][doc_4_x] (supported; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.3).
|
|
12
12
|
|
|
13
13
|
Features
|
|
14
14
|
--------
|
|
15
15
|
|
|
16
16
|
The main features provided by this library are:
|
|
17
17
|
|
|
18
|
-
* Parsing PHP
|
|
18
|
+
* Parsing PHP 7, and PHP 8 code into an abstract syntax tree (AST).
|
|
19
19
|
* Invalid code can be parsed into a partial AST.
|
|
20
20
|
* The AST contains accurate location information.
|
|
21
21
|
* Dumping the AST in human-readable form.
|
|
22
22
|
* Converting an AST back to PHP code.
|
|
23
|
-
*
|
|
23
|
+
* Formatting can be preserved for partially changed ASTs.
|
|
24
24
|
* Infrastructure to traverse and modify ASTs.
|
|
25
25
|
* Resolution of namespaced names.
|
|
26
26
|
* Evaluation of constant expressions.
|
|
@@ -51,7 +51,7 @@ function test($foo)
|
|
|
51
51
|
}
|
|
52
52
|
CODE;
|
|
53
53
|
|
|
54
|
-
$parser = (new ParserFactory)->
|
|
54
|
+
$parser = (new ParserFactory())->createForNewestSupportedVersion();
|
|
55
55
|
try {
|
|
56
56
|
$ast = $parser->parse($code);
|
|
57
57
|
} catch (Error $error) {
|
|
@@ -68,12 +68,17 @@ This dumps an AST looking something like this:
|
|
|
68
68
|
```
|
|
69
69
|
array(
|
|
70
70
|
0: Stmt_Function(
|
|
71
|
+
attrGroups: array(
|
|
72
|
+
)
|
|
71
73
|
byRef: false
|
|
72
74
|
name: Identifier(
|
|
73
75
|
name: test
|
|
74
76
|
)
|
|
75
77
|
params: array(
|
|
76
78
|
0: Param(
|
|
79
|
+
attrGroups: array(
|
|
80
|
+
)
|
|
81
|
+
flags: 0
|
|
77
82
|
type: null
|
|
78
83
|
byRef: false
|
|
79
84
|
variadic: false
|
|
@@ -88,12 +93,11 @@ array(
|
|
|
88
93
|
0: Stmt_Expression(
|
|
89
94
|
expr: Expr_FuncCall(
|
|
90
95
|
name: Name(
|
|
91
|
-
|
|
92
|
-
0: var_dump
|
|
93
|
-
)
|
|
96
|
+
name: var_dump
|
|
94
97
|
)
|
|
95
98
|
args: array(
|
|
96
99
|
0: Arg(
|
|
100
|
+
name: null
|
|
97
101
|
value: Expr_Variable(
|
|
98
102
|
name: foo
|
|
99
103
|
)
|
|
@@ -135,12 +139,16 @@ This gives us an AST where the `Function_::$stmts` are empty:
|
|
|
135
139
|
```
|
|
136
140
|
array(
|
|
137
141
|
0: Stmt_Function(
|
|
142
|
+
attrGroups: array(
|
|
143
|
+
)
|
|
138
144
|
byRef: false
|
|
139
145
|
name: Identifier(
|
|
140
146
|
name: test
|
|
141
147
|
)
|
|
142
148
|
params: array(
|
|
143
149
|
0: Param(
|
|
150
|
+
attrGroups: array(
|
|
151
|
+
)
|
|
144
152
|
type: null
|
|
145
153
|
byRef: false
|
|
146
154
|
variadic: false
|
|
@@ -203,9 +211,8 @@ Component documentation:
|
|
|
203
211
|
* [AST builders](doc/component/AST_builders.markdown)
|
|
204
212
|
* Fluent builders for AST nodes
|
|
205
213
|
* [Lexer](doc/component/Lexer.markdown)
|
|
206
|
-
*
|
|
207
|
-
*
|
|
208
|
-
* Custom attributes
|
|
214
|
+
* Emulation
|
|
215
|
+
* Tokens, positions and attributes
|
|
209
216
|
* [Error handling](doc/component/Error_handling.markdown)
|
|
210
217
|
* Column information for errors
|
|
211
218
|
* Error recovery (parsing of syntactically incorrect code)
|
|
@@ -215,11 +222,12 @@ Component documentation:
|
|
|
215
222
|
* [JSON representation](doc/component/JSON_representation.markdown)
|
|
216
223
|
* JSON encoding and decoding of ASTs
|
|
217
224
|
* [Performance](doc/component/Performance.markdown)
|
|
218
|
-
* Disabling
|
|
225
|
+
* Disabling Xdebug
|
|
219
226
|
* Reusing objects
|
|
220
227
|
* Garbage collection impact
|
|
221
228
|
* [Frequently asked questions](doc/component/FAQ.markdown)
|
|
222
229
|
* Parent and sibling references
|
|
223
230
|
|
|
224
231
|
[doc_3_x]: https://github.com/nikic/PHP-Parser/tree/3.x/doc
|
|
232
|
+
[doc_4_x]: https://github.com/nikic/PHP-Parser/tree/4.x/doc
|
|
225
233
|
[doc_master]: https://github.com/nikic/PHP-Parser/tree/master/doc
|
|
@@ -10,7 +10,7 @@ foreach ([__DIR__ . '/../../../autoload.php', __DIR__ . '/../vendor/autoload.php
|
|
|
10
10
|
|
|
11
11
|
ini_set('xdebug.max_nesting_level', 3000);
|
|
12
12
|
|
|
13
|
-
// Disable
|
|
13
|
+
// Disable Xdebug var_dump() output truncation
|
|
14
14
|
ini_set('xdebug.var_display_max_children', -1);
|
|
15
15
|
ini_set('xdebug.var_display_max_data', -1);
|
|
16
16
|
ini_set('xdebug.var_display_max_depth', -1);
|
|
@@ -26,13 +26,7 @@ if (empty($files)) {
|
|
|
26
26
|
showHelp("Must specify at least one file.");
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
$
|
|
30
|
-
'startLine', 'endLine', 'startFilePos', 'endFilePos', 'comments'
|
|
31
|
-
]]);
|
|
32
|
-
$parser = (new PhpParser\ParserFactory)->create(
|
|
33
|
-
PhpParser\ParserFactory::PREFER_PHP7,
|
|
34
|
-
$lexer
|
|
35
|
-
);
|
|
29
|
+
$parser = (new PhpParser\ParserFactory())->createForVersion($attributes['version']);
|
|
36
30
|
$dumper = new PhpParser\NodeDumper([
|
|
37
31
|
'dumpComments' => true,
|
|
38
32
|
'dumpPositions' => $attributes['with-positions'],
|
|
@@ -43,7 +37,10 @@ $traverser = new PhpParser\NodeTraverser();
|
|
|
43
37
|
$traverser->addVisitor(new PhpParser\NodeVisitor\NameResolver);
|
|
44
38
|
|
|
45
39
|
foreach ($files as $file) {
|
|
46
|
-
if (
|
|
40
|
+
if ($file === '-') {
|
|
41
|
+
$code = file_get_contents('php://stdin');
|
|
42
|
+
fwrite(STDERR, "====> Stdin:\n");
|
|
43
|
+
} else if (strpos($file, '<?php') === 0) {
|
|
47
44
|
$code = $file;
|
|
48
45
|
fwrite(STDERR, "====> Code $code\n");
|
|
49
46
|
} else {
|
|
@@ -108,7 +105,7 @@ function showHelp($error = '') {
|
|
|
108
105
|
if ($error) {
|
|
109
106
|
fwrite(STDERR, $error . "\n\n");
|
|
110
107
|
}
|
|
111
|
-
fwrite($error ? STDERR : STDOUT, <<<OUTPUT
|
|
108
|
+
fwrite($error ? STDERR : STDOUT, <<<'OUTPUT'
|
|
112
109
|
Usage: php-parse [operations] file1.php [file2.php ...]
|
|
113
110
|
or: php-parse [operations] "<?php code"
|
|
114
111
|
Turn PHP source code into an abstract syntax tree.
|
|
@@ -123,6 +120,7 @@ Operations is a list of the following options (--dump by default):
|
|
|
123
120
|
-c, --with-column-info Show column-numbers for errors (if available)
|
|
124
121
|
-P, --with-positions Show positions in node dumps
|
|
125
122
|
-r, --with-recovery Use parsing with error recovery
|
|
123
|
+
--version=VERSION Target specific PHP version (default: newest)
|
|
126
124
|
-h, --help Display this page
|
|
127
125
|
|
|
128
126
|
Example:
|
|
@@ -143,6 +141,7 @@ function parseArgs($args) {
|
|
|
143
141
|
'with-column-info' => false,
|
|
144
142
|
'with-positions' => false,
|
|
145
143
|
'with-recovery' => false,
|
|
144
|
+
'version' => PhpParser\PhpVersion::getNewestSupported(),
|
|
146
145
|
];
|
|
147
146
|
|
|
148
147
|
array_shift($args);
|
|
@@ -193,7 +192,9 @@ function parseArgs($args) {
|
|
|
193
192
|
$parseOptions = false;
|
|
194
193
|
break;
|
|
195
194
|
default:
|
|
196
|
-
if ($arg
|
|
195
|
+
if (preg_match('/^--version=(.*)$/', $arg, $matches)) {
|
|
196
|
+
$attributes['version'] = PhpParser\PhpVersion::fromString($matches[1]);
|
|
197
|
+
} elseif ($arg[0] === '-' && \strlen($arg[0]) > 1) {
|
|
197
198
|
showHelp("Invalid operation $arg.");
|
|
198
199
|
} else {
|
|
199
200
|
$files[] = $arg;
|
|
@@ -1,41 +1,43 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
2
|
+
"name": "nikic/php-parser",
|
|
3
|
+
"type": "library",
|
|
4
|
+
"description": "A PHP parser written in PHP",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"php",
|
|
7
|
+
"parser"
|
|
8
|
+
],
|
|
9
|
+
"license": "BSD-3-Clause",
|
|
10
|
+
"authors": [
|
|
11
|
+
{
|
|
12
|
+
"name": "Nikita Popov"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"require": {
|
|
16
|
+
"php": ">=7.4",
|
|
17
|
+
"ext-tokenizer": "*",
|
|
18
|
+
"ext-json": "*",
|
|
19
|
+
"ext-ctype": "*"
|
|
20
|
+
},
|
|
21
|
+
"require-dev": {
|
|
22
|
+
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
|
|
23
|
+
"ircmaxell/php-yacc": "^0.0.7"
|
|
24
|
+
},
|
|
25
|
+
"extra": {
|
|
26
|
+
"branch-alias": {
|
|
27
|
+
"dev-master": "5.0-dev"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"autoload": {
|
|
31
|
+
"psr-4": {
|
|
32
|
+
"PhpParser\\": "lib/PhpParser"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"autoload-dev": {
|
|
36
|
+
"psr-4": {
|
|
37
|
+
"PhpParser\\": "test/PhpParser/"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"bin": [
|
|
41
|
+
"bin/php-parse"
|
|
42
|
+
]
|
|
41
43
|
}
|
|
@@ -6,20 +6,28 @@ namespace PhpParser\Builder;
|
|
|
6
6
|
|
|
7
7
|
use PhpParser;
|
|
8
8
|
use PhpParser\BuilderHelpers;
|
|
9
|
+
use PhpParser\Modifiers;
|
|
10
|
+
use PhpParser\Node;
|
|
9
11
|
use PhpParser\Node\Const_;
|
|
10
12
|
use PhpParser\Node\Identifier;
|
|
11
13
|
use PhpParser\Node\Stmt;
|
|
12
14
|
|
|
13
|
-
class ClassConst implements PhpParser\Builder
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
protected $attributes = [];
|
|
17
|
-
|
|
15
|
+
class ClassConst implements PhpParser\Builder {
|
|
16
|
+
protected int $flags = 0;
|
|
17
|
+
/** @var array<string, mixed> */
|
|
18
|
+
protected array $attributes = [];
|
|
19
|
+
/** @var list<Const_> */
|
|
20
|
+
protected array $constants = [];
|
|
21
|
+
|
|
22
|
+
/** @var list<Node\AttributeGroup> */
|
|
23
|
+
protected array $attributeGroups = [];
|
|
24
|
+
/** @var Identifier|Node\Name|Node\ComplexType|null */
|
|
25
|
+
protected ?Node $type = null;
|
|
18
26
|
|
|
19
27
|
/**
|
|
20
28
|
* Creates a class constant builder
|
|
21
29
|
*
|
|
22
|
-
* @param string|Identifier
|
|
30
|
+
* @param string|Identifier $name Name
|
|
23
31
|
* @param Node\Expr|bool|null|int|float|string|array $value Value
|
|
24
32
|
*/
|
|
25
33
|
public function __construct($name, $value) {
|
|
@@ -29,7 +37,7 @@ class ClassConst implements PhpParser\Builder
|
|
|
29
37
|
/**
|
|
30
38
|
* Add another constant to const group
|
|
31
39
|
*
|
|
32
|
-
* @param string|Identifier
|
|
40
|
+
* @param string|Identifier $name Name
|
|
33
41
|
* @param Node\Expr|bool|null|int|float|string|array $value Value
|
|
34
42
|
*
|
|
35
43
|
* @return $this The builder instance (for fluid interface)
|
|
@@ -46,7 +54,7 @@ class ClassConst implements PhpParser\Builder
|
|
|
46
54
|
* @return $this The builder instance (for fluid interface)
|
|
47
55
|
*/
|
|
48
56
|
public function makePublic() {
|
|
49
|
-
$this->flags = BuilderHelpers::addModifier($this->flags,
|
|
57
|
+
$this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PUBLIC);
|
|
50
58
|
|
|
51
59
|
return $this;
|
|
52
60
|
}
|
|
@@ -57,7 +65,7 @@ class ClassConst implements PhpParser\Builder
|
|
|
57
65
|
* @return $this The builder instance (for fluid interface)
|
|
58
66
|
*/
|
|
59
67
|
public function makeProtected() {
|
|
60
|
-
$this->flags = BuilderHelpers::addModifier($this->flags,
|
|
68
|
+
$this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED);
|
|
61
69
|
|
|
62
70
|
return $this;
|
|
63
71
|
}
|
|
@@ -68,7 +76,18 @@ class ClassConst implements PhpParser\Builder
|
|
|
68
76
|
* @return $this The builder instance (for fluid interface)
|
|
69
77
|
*/
|
|
70
78
|
public function makePrivate() {
|
|
71
|
-
$this->flags = BuilderHelpers::addModifier($this->flags,
|
|
79
|
+
$this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE);
|
|
80
|
+
|
|
81
|
+
return $this;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Makes the constant final.
|
|
86
|
+
*
|
|
87
|
+
* @return $this The builder instance (for fluid interface)
|
|
88
|
+
*/
|
|
89
|
+
public function makeFinal() {
|
|
90
|
+
$this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::FINAL);
|
|
72
91
|
|
|
73
92
|
return $this;
|
|
74
93
|
}
|
|
@@ -88,6 +107,32 @@ class ClassConst implements PhpParser\Builder
|
|
|
88
107
|
return $this;
|
|
89
108
|
}
|
|
90
109
|
|
|
110
|
+
/**
|
|
111
|
+
* Adds an attribute group.
|
|
112
|
+
*
|
|
113
|
+
* @param Node\Attribute|Node\AttributeGroup $attribute
|
|
114
|
+
*
|
|
115
|
+
* @return $this The builder instance (for fluid interface)
|
|
116
|
+
*/
|
|
117
|
+
public function addAttribute($attribute) {
|
|
118
|
+
$this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute);
|
|
119
|
+
|
|
120
|
+
return $this;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Sets the constant type.
|
|
125
|
+
*
|
|
126
|
+
* @param string|Node\Name|Identifier|Node\ComplexType $type
|
|
127
|
+
*
|
|
128
|
+
* @return $this
|
|
129
|
+
*/
|
|
130
|
+
public function setType($type) {
|
|
131
|
+
$this->type = BuilderHelpers::normalizeType($type);
|
|
132
|
+
|
|
133
|
+
return $this;
|
|
134
|
+
}
|
|
135
|
+
|
|
91
136
|
/**
|
|
92
137
|
* Returns the built class node.
|
|
93
138
|
*
|
|
@@ -97,7 +142,9 @@ class ClassConst implements PhpParser\Builder
|
|
|
97
142
|
return new Stmt\ClassConst(
|
|
98
143
|
$this->constants,
|
|
99
144
|
$this->flags,
|
|
100
|
-
$this->attributes
|
|
145
|
+
$this->attributes,
|
|
146
|
+
$this->attributeGroups,
|
|
147
|
+
$this->type
|
|
101
148
|
);
|
|
102
149
|
}
|
|
103
150
|
}
|